cuibo01 commented on a change in pull request #4909: URL: https://github.com/apache/hudi/pull/4909#discussion_r816563490
########## File path: hudi-common/src/main/java/org/apache/hudi/io/storage/HoodieHFileReader.java ########## @@ -227,6 +261,40 @@ public BloomFilter readBloomFilter() { return records; } + public ClosableIterator<R> getRecordIterator(List<String> keys, Schema schema) throws IOException { + this.schema = schema; + reader.loadFileInfo(); + Iterator<String> iterator = keys.iterator(); + return new ClosableIterator<R>() { + private R next; + @Override + public void close() { + HoodieHFileReader.this.close(); + } Review comment:  We change the return of lookupRecords to ClosableIterator, but `reader` is in the `try`, so `reader` was closed by the `lookupRecords` -- 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: commits-unsubscr...@hudi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org