leesf commented on a change in pull request #2875:
URL: https://github.com/apache/hudi/pull/2875#discussion_r619807352



##########
File path: 
hudi-flink/src/main/java/org/apache/hudi/table/HoodieTableFactory.java
##########
@@ -152,6 +154,22 @@ private static void setupHoodieKeyOptions(Configuration 
conf, CatalogTable table
     }
   }
 
+  /**
+   * Sets up the cleaning options from the table definition.
+   */
+  private static void setupCleaningOptions(Configuration conf) {
+    int commitsToRetain = conf.getInteger(FlinkOptions.CLEAN_RETAIN_COMMITS);
+    int minCommitsToKeep = conf.getInteger(FlinkOptions.ARCHIVE_MIN_COMMITS);
+    if (commitsToRetain >= minCommitsToKeep) {

Review comment:
       I don't quietly understand why not align with the 
`HoodieCompactionConfig#build` to check `minCommitsToKeep` and 
`commitsToRetain`, and throw exception if users set wrong value. With default 
value, everything should work well.




-- 
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to