YuweiXiao commented on a change in pull request #4454:
URL: https://github.com/apache/hudi/pull/4454#discussion_r775872289



##########
File path: 
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/action/cluster/strategy/ClusteringPlanStrategy.java
##########
@@ -56,6 +59,37 @@
   private final transient HoodieEngineContext engineContext;
   private final HoodieWriteConfig writeConfig;
 
+  /**
+   * Check if the given class is deprecated.
+   * If it is, then try to convert it to suitable one and update the write 
config accordingly.
+   * @param config write config
+   * @return class name of clustering plan strategy
+   */
+  public static String checkAndGetClusteringPlanStrategy(HoodieWriteConfig 
config) {
+    String className = config.getClusteringPlanStrategyClass();
+    String sparkSizeBasedClassName = 
"org.apache.hudi.client.clustering.plan.strategy.SparkSizeBasedClusteringPlanStrategy";
+    String sparkSelectedPartitionsClassName = 
"org.apache.hudi.client.clustering.plan.strategy.SparkSelectedPartitionsClusteringPlanStrategy";
+    String sparkRecentDaysClassName = 
"org.apache.hudi.client.clustering.plan.strategy.SparkRecentDaysClusteringPlanStrategy";
+    String javaSelectedPartionClassName = 
"org.apache.hudi.client.clustering.plan.strategy.JavaRecentDaysClusteringPlanStrategy";

Review comment:
       The class is named as `JavaRecentDaysClusteringPlanStrategy `. (I did 
misspell it) 
   
   I'll try to reuse the existing config constants.




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


Reply via email to