danny0405 commented on code in PR #6515:
URL: https://github.com/apache/hudi/pull/6515#discussion_r957003256
##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/sink/CleanFunction.java:
##########
@@ -65,7 +65,7 @@ public void open(Configuration parameters) throws Exception {
this.writeClient = StreamerUtil.createWriteClient(conf,
getRuntimeContext());
this.executor =
NonThrownExecutor.builder(LOG).waitForTasksFinish(true).build();
- if (OptionsResolver.isInsertOverwrite(conf)) {
+ if (OptionsResolver.isInsertOverwrite(conf) ||
conf.getBoolean(FlinkOptions.BATCH_CLEAN_ENABLED)) {
String instantTime = HoodieActiveTimeline.createNewInstantTime();
Review Comment:
Can we just reuse the option `FlinkOptions.CLEAN_ASYNC_ENABLED` ?
```java
if (conf.getBoolean(FlinkOptions.CLEAN_ASYNC_ENABLED)) {
...
} else {
// clean synchronously
String instantTime = HoodieActiveTimeline.createNewInstantTime();
LOG.info(String.format("exec sync clean with instant time %s...",
instantTime));
writeClient.clean(instantTime);
}
```
--
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]