Skip to content

Conversation

@superbobry
Copy link
Contributor

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.

This change allows to use these streams in try-with-resources.
*/
@DeveloperApi
abstract class SerializationStream {
abstract class SerializationStream extends Closeable {
Copy link
Member

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, added that.

@SparkQA
Copy link

SparkQA commented Apr 11, 2017

Test build #3659 has finished for PR 17598 at commit 75ba026.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
  • abstract class SerializationStream extends Closeable
  • abstract class DeserializationStream extends Closeable

Copy link
Member

@srowen srowen left a 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.

@srowen
Copy link
Member

srowen commented Apr 13, 2017

Merged to master

@asfgit asfgit closed this in a4293c2 Apr 13, 2017
peter-toth pushed a commit to peter-toth/spark that referenced this pull request Oct 6, 2018
## 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 <[email protected]>

Closes apache#17598 from superbobry/compression-stream-closeable.
@Willymontaz Willymontaz deleted the compression-stream-closeable branch April 2, 2019 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants