kbuci commented on code in PR #18197:
URL: https://github.com/apache/hudi/pull/18197#discussion_r2886609390
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/BaseHoodieWriteClient.java:
##########
@@ -1682,4 +1684,25 @@ private InternalSchema
getInternalSchema(TableSchemaResolver schemaUtil) {
}
});
}
+
+ private void runPreWriteCleanerPolicy(HoodieTableMetaClient metaClient) {
+ if (!config.areTableServicesEnabled()) {
+ log.info("Skipping pre-write cleaner policy since table services are
disabled");
+ return;
+ }
+ HoodiePreWriteCleanerPolicy policy = config.getPreWriteCleanerPolicy();
+ if (policy.isNone()) {
+ return;
+ }
+ switch (policy) {
+ case CLEAN:
+ tableServiceClient.clean(Option.empty(), true);
Review Comment:
The reason I was thinking of clean as an option is since a user might have a
scenario where
- They are repeatedly insert_overwriting the same partition
- The ingestion job fails after completing the commit but before/while
performing clean
- older files start to buildup in DFS folder
so having an option to clean before each write allows users a way of
preventing/mitigating this without needing to launch/orchestrate/handhold a
separate "clean job"
--
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]