-
Notifications
You must be signed in to change notification settings - Fork 28.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SPARK-20284][CORE] Make {Des,S}erializationStream extend Closeable #17598
[SPARK-20284][CORE] Make {Des,S}erializationStream extend Closeable #17598
Conversation
This change allows to use these streams in try-with-resources.
@@ -125,7 +125,7 @@ abstract class SerializerInstance { | |||
* A stream for writing serialized objects. | |||
*/ | |||
@DeveloperApi | |||
abstract class SerializationStream { | |||
abstract class SerializationStream extends Closeable { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the close() method need 'override' then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, added that.
Test build #3659 has finished for PR 17598 at commit
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My only concern would be whether this changes the classes in a way that makes them subtly not compatible at runtime. MiMa doesn't seem to think so though, and it's a developer API, and I also can't think of why it would change compatibility of bytecode (close() method already exists) So I think this is OK.
Merged to master |
## What changes were proposed in this pull request? This PR allows to use `SerializationStream` and `DeserializationStream` in try-with-resources. ## How was this patch tested? `core` unit tests. Author: Sergei Lebedev <s.lebedev@criteo.com> Closes apache#17598 from superbobry/compression-stream-closeable.
What changes were proposed in this pull request?
This PR allows to use
SerializationStream
andDeserializationStream
in try-with-resources.How was this patch tested?
core
unit tests.