Skip to content

Conversation

@rdblue
Copy link
Contributor

@rdblue rdblue commented Dec 1, 2015

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.

@julienledem
Copy link
Member

LGTM

@julienledem
Copy link
Member

@jaltekruse did you have comments on this one?

@rdblue
Copy link
Contributor Author

rdblue commented Dec 8, 2015

I'll rebase this and merge once #250 is in with the ParquetProperties refactor to avoid blocking the larger change.

Copy link
Contributor

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?

Copy link
Contributor Author

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.
@rdblue rdblue force-pushed the PARQUET-353-release-compressor-resources branch from 27efab0 to a00f4b7 Compare December 9, 2015 00:15
@rdblue
Copy link
Contributor Author

rdblue commented Dec 9, 2015

Okay, rebased on PARQUET-99 and ready for another look. Thanks @julienledem and @jaltekruse!

@rdblue
Copy link
Contributor Author

rdblue commented Dec 11, 2015

@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!

@jaltekruse
Copy link
Contributor

+1

@rdblue
Copy link
Contributor Author

rdblue commented Dec 11, 2015

Thanks!

@asfgit asfgit closed this in 4916903 Dec 11, 2015
piyushnarang pushed a commit to piyushnarang/parquet-mr that referenced this pull request Jun 15, 2016
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.
rdblue added a commit to rdblue/parquet-mr that referenced this pull request Jul 13, 2016
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
rdblue added a commit to rdblue/parquet-mr that referenced this pull request Jan 6, 2017
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
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