ksmou commented on code in PR #10050:
URL: https://github.com/apache/hudi/pull/10050#discussion_r1398703800
##########
hudi-utilities/src/main/java/org/apache/hudi/utilities/HoodieCompactor.java:
##########
@@ -172,18 +172,12 @@ public static void main(String[] args) {
throw new HoodieException("Fail to run compaction for " + cfg.tableName
+ ", return code: " + 1);
}
final JavaSparkContext jsc = UtilHelpers.buildSparkContext("compactor-" +
cfg.tableName, cfg.sparkMaster, cfg.sparkMemory);
- int ret = 0;
- try {
- ret = new HoodieCompactor(jsc, cfg).compact(cfg.retry);
- } catch (Throwable throwable) {
- throw new HoodieException("Fail to run compaction for " + cfg.tableName
+ ", return code: " + ret, throwable);
- } finally {
- jsc.stop();
- }
-
+ int ret = new HoodieCompactor(jsc, cfg).compact(cfg.retry);
if (ret != 0) {
throw new HoodieException("Fail to run compaction for " + cfg.tableName
+ ", return code: " + ret);
}
+ LOG.info("Success to run compaction for " + cfg.tableName);
+ jsc.stop();
Review Comment:
L175 will calls `UtilHelpers.retry` internal, which has try-catch block.
This try-catch block is unreachable.
--
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]