bvaradar 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_r276860471
 
 

 ##########
 File path: 
hoodie-common/src/main/java/com/uber/hoodie/common/util/collection/LazyFileIterable.java
 ##########
 @@ -34,19 +31,19 @@
 public class LazyFileIterable<T, R> implements Iterable<R> {
 
   // Used to access the value written at a specific position in the file
-  private final RandomAccessFile readOnlyFileHandle;
+  private final String filePath;
   // Stores the key and corresponding value's latest metadata spilled to disk
   private final Map<T, DiskBasedMap.ValueMetadata> 
inMemoryMetadataOfSpilledData;
 
-  public LazyFileIterable(RandomAccessFile file, Map<T, 
DiskBasedMap.ValueMetadata> map) {
-    this.readOnlyFileHandle = file;
+  public LazyFileIterable(String filePath, Map<T, DiskBasedMap.ValueMetadata> 
map) {
+    this.filePath = filePath;
 
 Review comment:
   Allows clear ownership of RandomAccessFile to LazyFileIterable.  Unlike 
get() calls, file.open() per iteration of all entries should be an ok overhead. 
Also, unlike other cases, with iterator, we can clearly know when to close the 
file handle.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to