You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2022/04/27 12:11:44 UTC

[GitHub] [hudi] xiarixiaoyao commented on a diff in pull request #5391: [HUDI-3945] After the async compaction operation is complete, the task should exit

xiarixiaoyao commented on code in PR #5391:
URL: https://github.com/apache/hudi/pull/5391#discussion_r859716348


##########
hudi-utilities/src/main/java/org/apache/hudi/utilities/HoodieCompactor.java:
##########
@@ -171,13 +171,15 @@ public static void main(String[] args) {
       System.exit(1);
     }
     final JavaSparkContext jsc = UtilHelpers.buildSparkContext("compactor-" + cfg.tableName, cfg.sparkMaster, cfg.sparkMemory);
+    int ret = 0;
     try {
       HoodieCompactor compactor = new HoodieCompactor(jsc, cfg);
-      compactor.compact(cfg.retry);
+      ret = compactor.compact(cfg.retry);
     } catch (Throwable throwable) {
       LOG.error("Fail to run compaction for " + cfg.tableName, throwable);
     } finally {
       jsc.stop();
+      System.exit(ret);

Review Comment:
   why we need call System.exit here ?



-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org