danny0405 commented on a change in pull request #4909:
URL: https://github.com/apache/hudi/pull/4909#discussion_r816548129



##########
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:
       The tests fail with NPE i guess it is because this line, we should do 
nothing here because the caller would take care the close of the reader.




-- 
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]


Reply via email to