n3nash commented on a change in pull request #600: Timeline Service with Incremental View Syncing support URL: https://github.com/apache/incubator-hudi/pull/600#discussion_r274224728
########## File path: hoodie-common/src/main/java/com/uber/hoodie/common/util/collection/LazyFileIterable.java ########## @@ -70,23 +71,25 @@ public LazyFileIterator(RandomAccessFile file, Map<T, DiskBasedMap.ValueMetadata (Map.Entry<T, DiskBasedMap.ValueMetadata> o1, Map.Entry<T, DiskBasedMap.ValueMetadata> o2) -> o1.getValue().getOffsetOfValue().compareTo(o2.getValue().getOffsetOfValue())) .collect(Collectors.toList()).iterator(); + this.addShutdownHook(); } @Override public boolean hasNext() { - return this.metadataIterator.hasNext(); + boolean available = this.metadataIterator.hasNext(); + if (!available) { Review comment: Why close() in a hasNext() API ? That's not a uniform behavior. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services