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_r276874090
 
 

 ##########
 File path: 
hoodie-client/src/main/java/com/uber/hoodie/io/HoodieMergeHandle.java
 ##########
 @@ -69,17 +67,14 @@
   public HoodieMergeHandle(HoodieWriteConfig config, String commitTime, 
HoodieTable<T> hoodieTable,
       Iterator<HoodieRecord<T>> recordItr, String fileId) {
     super(config, commitTime, hoodieTable);
-    this.fileSystemView = hoodieTable.getROFileSystemView();
     String partitionPath = init(fileId, recordItr);
     init(fileId, partitionPath,
-        fileSystemView.getLatestDataFiles(partitionPath)
-            .filter(dataFile -> 
dataFile.getFileId().equals(fileId)).findFirst());
+        hoodieTable.getROFileSystemView().getLatestDataFile(partitionPath, 
fileId).get());
   }
 
   public HoodieMergeHandle(HoodieWriteConfig config, String commitTime, 
HoodieTable<T> hoodieTable,
-      Map<String, HoodieRecord<T>> keyToNewRecords, String fileId, 
Optional<HoodieDataFile> dataFileToBeMerged) {
+      Map<String, HoodieRecord<T>> keyToNewRecords, String fileId, 
HoodieDataFile dataFileToBeMerged) {
 
 Review comment:
   It was never empty() here earlier. The initial assumption was for 
HoodieMergeHandle to take care of compaction for both cases
   
   (1) when base data file was present and
   (2) when base file was absent (for inserts to log-files)
   
   but  then subsequent implementation used HoodieCreateHandle to handle (2)

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