the-other-tim-brown commented on code in PR #13178:
URL: https://github.com/apache/hudi/pull/13178#discussion_r2058725603
##########
hudi-hadoop-common/src/main/java/org/apache/hudi/io/hadoop/HoodieHBaseAvroHFileReader.java:
##########
@@ -628,6 +628,8 @@ public boolean hasNext() {
try {
// NOTE: This is required for idempotency
if (eof) {
+ // eagerly close
+ close();
Review Comment:
This helps proactively free up resources if all elements are read,
especially in places that try with resources was missed or if the close is in a
later callback. If the iterator is closed without going through all of the
elements, it will hit the `close` method to ensure that the input stream is
still closed
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]