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

[Iceberg] cleanup FileIO resources #33509

Merged
merged 6 commits into from
Jan 8, 2025
Merged

Conversation

ahmedabu98
Copy link
Contributor

Small PR to cleanup some resources that may be leaking and causing our Iceberg ITs to hang

@github-actions github-actions bot added the build label Jan 6, 2025
Copy link
Contributor

github-actions bot commented Jan 6, 2025

Assigning reviewers. If you would like to opt out of this review, comment assign to next reviewer:

R: @m-trieu for label java.
R: @damccorm for label build.
R: @chamikaramj for label io.

Available commands:

  • stop reviewer notifications - opt out of the automated review tooling
  • remind me after tests pass - tag the comment author after tests pass
  • waiting on author - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)

The PR bot will only process comments in the main thread (not review comments).

@@ -201,14 +200,15 @@ private void appendManifestFiles(Table table, Iterable<FileWriteResult> fileWrit
}

private ManifestWriter<DataFile> createManifestWriter(
String tableLocation, String uuid, PartitionSpec spec, FileIO io) {
String tableLocation, String uuid, PartitionSpec spec, Table table) {
Copy link
Contributor

Choose a reason for hiding this comment

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

if we are passing Table now we could drop tableLocation and spec

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thx for the catch. I refactored this a lil to make it more clean.

btw spec here isn't a simple table.spec(). This part of the code deals with the edge case where we have a batch of data files that were written with different specs (e.g. user updates spec during pipeline runtime). We group data files by spec and create/append one ManifestFile per spec.

Copy link
Contributor

Choose a reason for hiding this comment

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

ah! nice makes sense

Copy link
Contributor

@damccorm damccorm left a comment

Choose a reason for hiding this comment

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

Thanks!

Copy link

codecov bot commented Jan 8, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 60.40%. Comparing base (b3e7f55) to head (f841d5c).
Report is 22 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master   #33509      +/-   ##
============================================
+ Coverage     59.03%   60.40%   +1.37%     
- Complexity     3186    15154   +11968     
============================================
  Files          1146     2753    +1607     
  Lines        176129   267152   +91023     
  Branches       3366    12153    +8787     
============================================
+ Hits         103975   161384   +57409     
- Misses        68800    99316   +30516     
- Partials       3354     6452    +3098     
Flag Coverage Δ
java 64.82% <ø> (-5.52%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ahmedabu98 ahmedabu98 merged commit 5a3ddc4 into apache:master Jan 8, 2025
23 checks passed
claudevdm pushed a commit to claudevdm/beam that referenced this pull request Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants