zhuanshenbsj1 commented on code in PR #8394:
URL: https://github.com/apache/hudi/pull/8394#discussion_r1168119639
##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/sink/clustering/HoodieFlinkClusteringJob.java:
##########
@@ -358,6 +358,9 @@ private void cluster() throws Exception {
.setParallelism(1);
env.execute("flink_hudi_clustering_" + clusteringInstant.getTimestamp());
+ if (conf.getBoolean(FlinkOptions.CLEAN_ASYNC_ENABLED) &&
conf.getBoolean(FlinkOptions.CLEAN_OFFLINE_ENABLE)){
+ writeClient.clean();
+ }
Review Comment:
Oh, I see. My Hudi version does not include this PR
https://github.com/apache/hudi/pull/6515, So cleanFunction#open only do clean
when OptionsResolver.isInsertOverwrite(conf) is true.
```
@Override
public void open(Configuration parameters) throws Exception {
super.open(parameters);
if (conf.getBoolean(FlinkOptions.CLEAN_ASYNC_ENABLED)) {
this.writeClient = FlinkWriteClients.createWriteClient(conf,
getRuntimeContext());
this.executor =
NonThrownExecutor.builder(LOG).waitForTasksFinish(true).build();
if (OptionsResolver.isInsertOverwrite(conf)) {
String instantTime = HoodieActiveTimeline.createNewInstantTime();
LOG.info(String.format("exec sync clean with instant time %s...",
instantTime));
executor.execute(() -> writeClient.clean(instantTime), "wait for sync
cleaning finish");
}
}
}
```
--
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]