-
Notifications
You must be signed in to change notification settings - Fork 1.5k
PARQUET-353: Release compression resources. #295
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
PARQUET-353: Release compression resources. #295
Conversation
|
LGTM |
|
@jaltekruse did you have comments on this one? |
|
I'll rebase this and merge once #250 is in with the ParquetProperties refactor to avoid blocking the larger change. |
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.
should this be in a finally block to release in the case where an exception occurs?
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.
Yep.
This updates the use of CodecFactory in the output format and writer classes so that its lifecycle is tied to ParquetWriter and ParquetRecordWriter. When those classes are closed, the resources held by the CodecFactory associated with the instance are released.
27efab0 to
a00f4b7
Compare
|
Okay, rebased on PARQUET-99 and ready for another look. Thanks @julienledem and @jaltekruse! |
|
@jaltekruse, can you take a quick look at this patch? I've addressed the problem you identified and I'd like to get it in. Thanks for your help! |
|
+1 |
|
Thanks! |
This updates the use of CodecFactory in the output format and writer classes so that its lifecycle is tied to ParquetWriter and ParquetRecordWriter. When those classes are closed, the resources held by the CodecFactory associated with the instance are released. This is an alternative to and closes apache#282. Author: Ryan Blue <blue@apache.org> Closes apache#295 from rdblue/PARQUET-353-release-compressor-resources and squashes the following commits: a00f4b7 [Ryan Blue] PARQUET-353: Release compression resources.
This updates the use of CodecFactory in the output format and writer classes so that its lifecycle is tied to ParquetWriter and ParquetRecordWriter. When those classes are closed, the resources held by the CodecFactory associated with the instance are released. This is an alternative to and closes apache#282. Author: Ryan Blue <blue@apache.org> Closes apache#295 from rdblue/PARQUET-353-release-compressor-resources and squashes the following commits: a00f4b7 [Ryan Blue] PARQUET-353: Release compression resources. Conflicts: parquet-hadoop/src/main/java/org/apache/parquet/hadoop/ParquetOutputFormat.java parquet-hadoop/src/main/java/org/apache/parquet/hadoop/ParquetRecordWriter.java parquet-hadoop/src/main/java/org/apache/parquet/hadoop/ParquetWriter.java Resolution: Minor changes due to an argument relocation in the ByteBuffer patch that wasn't backported
This updates the use of CodecFactory in the output format and writer classes so that its lifecycle is tied to ParquetWriter and ParquetRecordWriter. When those classes are closed, the resources held by the CodecFactory associated with the instance are released. This is an alternative to and closes apache#282. Author: Ryan Blue <blue@apache.org> Closes apache#295 from rdblue/PARQUET-353-release-compressor-resources and squashes the following commits: a00f4b7 [Ryan Blue] PARQUET-353: Release compression resources. Conflicts: parquet-hadoop/src/main/java/org/apache/parquet/hadoop/ParquetOutputFormat.java parquet-hadoop/src/main/java/org/apache/parquet/hadoop/ParquetRecordWriter.java parquet-hadoop/src/main/java/org/apache/parquet/hadoop/ParquetWriter.java Resolution: Minor changes due to an argument relocation in the ByteBuffer patch that wasn't backported
This updates the use of CodecFactory in the output format and writer
classes so that its lifecycle is tied to ParquetWriter and
ParquetRecordWriter. When those classes are closed, the resources held
by the CodecFactory associated with the instance are released.
This is an alternative to and closes #282.