You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2022/08/29 07:54:21 UTC
[GitHub] [hudi] danny0405 commented on a diff in pull request #6515: [HUDI-4370] FIX Batch job cannot clean old commits&data files in clea…
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org