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 2021/12/28 11:49:44 UTC
[GitHub] [hudi] YuweiXiao commented on a change in pull request #4454: [HUDI-3095] abstract partition filter logic to enable code reuse
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org