-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[HUDI-6092] Reuse schema objects while deserializing log blocks. #8484
[HUDI-6092] Reuse schema objects while deserializing log blocks. #8484
Conversation
|
||
return new CloseableMappingIterator<>(recordIterator, data -> (HoodieRecord<T>) data); | ||
return new CloseableMappingIterator<>(recordIterator, data -> (HoodieRecord<T>) 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.
Is the iterator still valid when the outer reader has been closed ?
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.
Probably not. I will backup these changes which introduce try block.
I think the intention is to return an iterator which will close the reader after iteration (hence the name ClosableIterator).
952ed0d
to
04ccb55
Compare
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
@hudi-bot run azure |
[HUDI-6092] Reuse schema objects while deserializing log blocks.
Change Logs
Also introduced some try { } blocks in code to auto close resources which were being leaked.
Impact
When reading log files with a very large number of log blocks, there is reduced memory consumption.
Risk level (write none, low medium or high below)
None
Documentation Update
None
Contributor's checklist