Skip to content
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-2472: Close in finally block in ParquetFileWriter#end #1350

Merged
merged 1 commit into from
May 17, 2024

Conversation

amogh-jahagirdar
Copy link
Contributor

@amogh-jahagirdar amogh-jahagirdar commented May 15, 2024

Make sure you have checked all steps below.

Jira

Tests

  • My PR adds the following unit tests OR does not need testing for this extremely good reason:

Commits

  • My commits all reference Jira issues in their subject lines. In addition, my commits follow the guidelines
    from "How to write a good git commit message":
    1. Subject is separated from body by a blank line
    2. Subject is limited to 50 characters (not including Jira issue reference)
    3. Subject does not end with a period
    4. Subject uses the imperative mood ("add", not "adding")
    5. Body wraps at 72 characters
    6. Body explains "what" and "why", not "how"

Style

  • My contribution adheres to the code style guidelines and Spotless passes.
    • To apply the necessary changes, run mvn spotless:apply -Pvector-plugins

Documentation

  • In case of new functionality, my PR adds documentation that describes how to use it.
    • All the public functions and the classes in the PR contain Javadoc that explain what it does

@amogh-jahagirdar
Copy link
Contributor Author

Working on creating a JIRA for this, I'm new to contributing to Parquet, so please let me know if there's anything I'm missing or should do, thanks!

@amogh-jahagirdar amogh-jahagirdar changed the title Close in finally block in ParquetFileWriter#end PARQUET-2472: Close in finally block in ParquetFileWriter#end May 15, 2024
It's currently possible that ParquetFileWriter#end fails when
writing out the footer, and we don't clean up resources.
This change addresses this by explicitly closing the output stream
in the finally block.
Copy link
Member

@wgtmac wgtmac left a comment

Choose a reason for hiding this comment

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

+1

Thanks for the fix!

Copy link
Contributor

@Fokko Fokko left a comment

Choose a reason for hiding this comment

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

Looking good @amogh-jahagirdar, thanks for the fix 👍

@wgtmac wgtmac merged commit f12229a into apache:master May 17, 2024
9 checks passed
clairemcginty pushed a commit to clairemcginty/parquet-mr that referenced this pull request May 17, 2024
…#1350)

It's currently possible that ParquetFileWriter#end fails when
writing out the footer, and we don't clean up resources.
This change addresses this by explicitly closing the output stream
in the finally block.
@Fokko
Copy link
Contributor

Fokko commented May 21, 2024

@amogh-jahagirdar do you want to backport this to 1.14.1 as well?

Fokko pushed a commit that referenced this pull request Jul 22, 2024
It's currently possible that ParquetFileWriter#end fails when
writing out the footer, and we don't clean up resources.
This change addresses this by explicitly closing the output stream
in the finally block.
@Fokko Fokko added this to the 1.14.2 milestone Aug 14, 2024
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