YuweiXiao commented on a change in pull request #4454:
URL: https://github.com/apache/hudi/pull/4454#discussion_r775869731
##########
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";
Review comment:
Sure, will reuse constants.
And about these legacy class name, I'll keep them as it is because they are
not in `HoodieClusteringConfig`. Moving them to the config file may confuse
users.
--
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]