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

Avoid WriteStatus collect() call when committing batch to prevent Driver side OOM errors #512

Merged
merged 1 commit into from
Nov 28, 2018

Conversation

bvaradar
Copy link
Contributor

WriteStatus has references to failed and written HoodieRecords. So, collecting them in driver will cause OOM errors for large batches. This PR removes calling collect of WriteStatus RDD and instead collects only File stats for the affected files.

Note that this PR does not address executor side overhead for retaining individual records in WriteStatus

@bvaradar
Copy link
Contributor Author

@vinothchandar @n3nash : Please review when you get a chance.

Copy link
Member

@vinothchandar vinothchandar left a comment

Choose a reason for hiding this comment

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

makes sense..

//TODO: why is stat.getPartitionPath() null at times here.
metadata.addWriteStat(status.getPartitionPath(), stat);
metadata.addWriteStat(partitionPath, stat);
Copy link
Member

Choose a reason for hiding this comment

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

I remember running into some weird test fail when getting the partition path from the stat?

@@ -127,6 +127,7 @@ private void init(HoodieRecord record) {
writeStatus.getStat().setPrevCommit(baseInstantTime);
writeStatus.setFileId(fileId);
writeStatus.setPartitionPath(partitionPath);
writeStatus.getStat().setPartitionPath(partitionPath);
Copy link
Member

Choose a reason for hiding this comment

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

yep. this is it. :P

@vinothchandar vinothchandar merged commit f999e49 into apache:master Nov 28, 2018
vinishjail97 pushed a commit to vinishjail97/hudi that referenced this pull request Feb 16, 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.

2 participants