[HUDI-2421] Catch the throwable when scheduling the cleaning task for flink writer (#3650)
This commit is contained in:
@@ -81,8 +81,13 @@ public class CleanFunction<T> extends AbstractRichFunction
|
|||||||
@Override
|
@Override
|
||||||
public void snapshotState(FunctionSnapshotContext context) throws Exception {
|
public void snapshotState(FunctionSnapshotContext context) throws Exception {
|
||||||
if (conf.getBoolean(FlinkOptions.CLEAN_ASYNC_ENABLED) && !isCleaning) {
|
if (conf.getBoolean(FlinkOptions.CLEAN_ASYNC_ENABLED) && !isCleaning) {
|
||||||
|
try {
|
||||||
this.writeClient.startAsyncCleaning();
|
this.writeClient.startAsyncCleaning();
|
||||||
this.isCleaning = true;
|
this.isCleaning = true;
|
||||||
|
} catch (Throwable throwable) {
|
||||||
|
// catch the exception to not affect the normal checkpointing
|
||||||
|
LOG.warn("Error while start async cleaning", throwable);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user