senthh commented on code in PR #13415:
URL: https://github.com/apache/hudi/pull/13415#discussion_r2139096767
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/action/compact/HoodieCompactor.java:
##########
@@ -250,36 +253,41 @@ 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();
+ // 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:
my bad, my thought to remove scanner.close and place it inside Finally
block so that we can ensure scanner.close will get called irrespective of
exception occurs or not.
And now I have corrected.
--
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]