xuzifu666 commented on code in PR #9835:
URL: https://github.com/apache/hudi/pull/9835#discussion_r1353918184


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/action/compact/HoodieCompactor.java:
##########
@@ -229,28 +228,28 @@ public List<WriteStatus> compact(HoodieCompactionHandler 
compactionHandler,
         Path newFilePath = new Path(oldFilePath.getParent(), newFileName);
         FileUtil.copy(fs,oldFilePath, fs, newFilePath, false, fs.getConf());
         */
+        }
       }
-    }
 
-    // Compacting is very similar to applying updates to existing file
-    Iterator<List<WriteStatus>> result;
-    result = executionHelper.writeFileAndGetWriteStats(compactionHandler, 
operation, instantTime, scanner, oldDataFileOpt);
-    scanner.close();

Review Comment:
   > > We already close the scanner here?
    yes,put in try block,not close it explicitly,may more safely @danny0405
   
   



##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/action/compact/HoodieCompactor.java:
##########
@@ -229,28 +228,28 @@ public List<WriteStatus> compact(HoodieCompactionHandler 
compactionHandler,
         Path newFilePath = new Path(oldFilePath.getParent(), newFileName);
         FileUtil.copy(fs,oldFilePath, fs, newFilePath, false, fs.getConf());
         */
+        }
       }
-    }
 
-    // Compacting is very similar to applying updates to existing file
-    Iterator<List<WriteStatus>> result;
-    result = executionHelper.writeFileAndGetWriteStats(compactionHandler, 
operation, instantTime, scanner, oldDataFileOpt);
-    scanner.close();

Review Comment:
   > > We already close the scanner here?
    yes,put in try block,not close it explicitly,may more safely @danny0405
   
   



##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/action/compact/HoodieCompactor.java:
##########
@@ -229,28 +228,28 @@ public List<WriteStatus> compact(HoodieCompactionHandler 
compactionHandler,
         Path newFilePath = new Path(oldFilePath.getParent(), newFileName);
         FileUtil.copy(fs,oldFilePath, fs, newFilePath, false, fs.getConf());
         */
+        }
       }
-    }
 
-    // Compacting is very similar to applying updates to existing file
-    Iterator<List<WriteStatus>> result;
-    result = executionHelper.writeFileAndGetWriteStats(compactionHandler, 
operation, instantTime, scanner, oldDataFileOpt);
-    scanner.close();

Review Comment:
   > > We already close the scanner here?
    yes,put in try block,not close it explicitly,may more safely @danny0405
   
   



##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/action/compact/HoodieCompactor.java:
##########
@@ -229,28 +228,28 @@ public List<WriteStatus> compact(HoodieCompactionHandler 
compactionHandler,
         Path newFilePath = new Path(oldFilePath.getParent(), newFileName);
         FileUtil.copy(fs,oldFilePath, fs, newFilePath, false, fs.getConf());
         */
+        }
       }
-    }
 
-    // Compacting is very similar to applying updates to existing file
-    Iterator<List<WriteStatus>> result;
-    result = executionHelper.writeFileAndGetWriteStats(compactionHandler, 
operation, instantTime, scanner, oldDataFileOpt);
-    scanner.close();

Review Comment:
   > We already close the scanner here?
   
   
   yes,put in try block,not close it explicitly,may more safely @danny0405 
   



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