Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
[HUDI-4038] Avoid calling
getDataSize
after every record written #5497[HUDI-4038] Avoid calling
getDataSize
after every record written #5497Changes from all commits
53d657e
e9ab768
2ae4ae4
18b0f4f
56fc702
750c4ea
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
+1 to the overall idea. but here is the deal - the size may not update until a row group is actually flushed out to storage. so
getDataSize()
simply returns0
until then. This on the fly file sizing is only useful for large files with multiple blocks/row groups. This is the behavior back in the day.What pattern did you observe on writes to S3? is the
getDataSize()
real-time i.e reflect the last write's size between subsequent calls?I see the code here. which should respect the buffered data?
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.
It won't: it always returns accurate metric, b/c
lastRowGroupEndPos
)columnStore.getBufferedSize()
)With the second being the problem -- it always traverse all of the cached all groups to accurately calculate the in-memory footprint (and there's no internal caching). So what ended up happening it kept growing the buffer for the whole file (120Mb) not flushing in until closure which was making traversals quadratic in runtime.
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.
Can we file a JIRA for this follow on work, after verifying the realtime ness of the
getDataSize()
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.
I validated that
getDataSize
returns accurate results for buffered data