[HUDI-3945] After the async compaction operation is complete, the task should exit. (#5391)
Co-authored-by: y00617041 <yangxuan42@huawei.com>
This commit is contained in:
@@ -171,13 +171,15 @@ public class HoodieCompactor {
|
|||||||
System.exit(1);
|
System.exit(1);
|
||||||
}
|
}
|
||||||
final JavaSparkContext jsc = UtilHelpers.buildSparkContext("compactor-" + cfg.tableName, cfg.sparkMaster, cfg.sparkMemory);
|
final JavaSparkContext jsc = UtilHelpers.buildSparkContext("compactor-" + cfg.tableName, cfg.sparkMaster, cfg.sparkMemory);
|
||||||
|
int ret = 0;
|
||||||
try {
|
try {
|
||||||
HoodieCompactor compactor = new HoodieCompactor(jsc, cfg);
|
HoodieCompactor compactor = new HoodieCompactor(jsc, cfg);
|
||||||
compactor.compact(cfg.retry);
|
ret = compactor.compact(cfg.retry);
|
||||||
} catch (Throwable throwable) {
|
} catch (Throwable throwable) {
|
||||||
LOG.error("Fail to run compaction for " + cfg.tableName, throwable);
|
LOG.error("Fail to run compaction for " + cfg.tableName, throwable);
|
||||||
} finally {
|
} finally {
|
||||||
jsc.stop();
|
jsc.stop();
|
||||||
|
System.exit(ret);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user