1
0

[HUDI-2421] Catch the throwable when scheduling the cleaning task for flink writer (#3650)

This commit is contained in:
Danny Chan
2021-09-13 20:43:44 +08:00
committed by GitHub
parent 9f3c4a2a7f
commit 89651c9408

View File

@@ -81,8 +81,13 @@ public class CleanFunction<T> extends AbstractRichFunction
@Override
public void snapshotState(FunctionSnapshotContext context) throws Exception {
if (conf.getBoolean(FlinkOptions.CLEAN_ASYNC_ENABLED) && !isCleaning) {
this.writeClient.startAsyncCleaning();
this.isCleaning = true;
try {
this.writeClient.startAsyncCleaning();
this.isCleaning = true;
} catch (Throwable throwable) {
// catch the exception to not affect the normal checkpointing
LOG.warn("Error while start async cleaning", throwable);
}
}
}