leesf commented on a change in pull request #1237: [MINOR] Code Cleanup, remove 
redundant code, and other changes
URL: https://github.com/apache/incubator-hudi/pull/1237#discussion_r368191200
 
 

 ##########
 File path: 
hudi-common/src/main/java/org/apache/hudi/common/table/view/RocksDbBasedFileSystemView.java
 ##########
 @@ -194,69 +193,66 @@ protected void storePartitionView(String partitionPath, 
List<HoodieFileGroup> fi
    */
   protected void applyDeltaFileSlicesToPartitionView(String partition, 
List<HoodieFileGroup> deltaFileGroups,
       DeltaApplyMode mode) {
-    rocksDB.writeBatch(batch -> {
-      deltaFileGroups.stream().forEach(fg -> {
-        fg.getAllRawFileSlices().map(fs -> {
-          FileSlice oldSlice = getFileSlice(partition, fs.getFileId(), 
fs.getBaseInstantTime());
-          if (null == oldSlice) {
-            return fs;
-          } else {
-            // First remove the file-slice
-            LOG.info("Removing old Slice in DB. FS=" + oldSlice);
-            rocksDB.deleteInBatch(batch, schemaHelper.getColFamilyForView(),
-                schemaHelper.getKeyForSliceView(fg, oldSlice));
-            rocksDB.deleteInBatch(batch, schemaHelper.getColFamilyForView(),
-                schemaHelper.getKeyForDataFileView(fg, oldSlice));
-
-            Map<String, HoodieLogFile> logFiles = oldSlice.getLogFiles()
-                .map(lf -> 
Pair.of(Path.getPathWithoutSchemeAndAuthority(lf.getPath()).toString(), lf))
-                .collect(Collectors.toMap(Pair::getKey, Pair::getValue));
-            Map<String, HoodieLogFile> deltaLogFiles =
-                fs.getLogFiles().map(lf -> 
Pair.of(Path.getPathWithoutSchemeAndAuthority(lf.getPath()).toString(), lf))
+    rocksDB.writeBatch(batch ->
+        deltaFileGroups.forEach(fg ->
+            fg.getAllRawFileSlices().map(fs -> {
+              FileSlice oldSlice = getFileSlice(partition, fs.getFileId(), 
fs.getBaseInstantTime());
+              if (null == oldSlice) {
+                return fs;
+              } else {
+                // First remove the file-slice
+                // LOG.info("Removing old Slice in DB. FS=" + oldSlice);
 
 Review comment:
   still keep this line uncommented?

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