cuibo01 commented on a change in pull request #4909: URL: https://github.com/apache/hudi/pull/4909#discussion_r816580335
########## 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: yes, but the `reader` is newly created each time in `lookupRecords `, and if it is not closed, it leaks. -- 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