beyond1920 commented on code in PR #9030:
URL: https://github.com/apache/hudi/pull/9030#discussion_r1238583456


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/config/HoodieClusteringConfig.java:
##########
@@ -642,27 +657,32 @@ private void validate() {
               + "schedule inline clustering (%s) can be enabled. Both can't be 
set to true at the same time. %s,%s", 
HoodieClusteringConfig.INLINE_CLUSTERING.key(),
           HoodieClusteringConfig.SCHEDULE_INLINE_CLUSTERING.key(), 
inlineCluster, inlineClusterSchedule));
 
-      if (engineType.equals(EngineType.FLINK)) {
-        // support resize for Flink to unlock the validation.
-        return;
+      if (isConsistentHashingBucketIndex()) {
+        String planStrategy = 
clusteringConfig.getString(PLAN_STRATEGY_CLASS_NAME);
+        ValidationUtils.checkArgument(
+            
planStrategy.equalsIgnoreCase(SPARK_CONSISTENT_BUCKET_CLUSTERING_PLAN_STRATEGY)
+                || 
planStrategy.equalsIgnoreCase(FLINK_CONSISTENT_BUCKET_CLUSTERING_PLAN_STRATEGY),
+            "Consistent hashing bucket index only supports clustering plan 
strategy : " + SPARK_CONSISTENT_BUCKET_CLUSTERING_PLAN_STRATEGY + " | " + 
FLINK_CONSISTENT_BUCKET_CLUSTERING_PLAN_STRATEGY);
+        ValidationUtils.checkArgument(
+            engineType == EngineType.FLINK
+                || 
clusteringConfig.getString(EXECUTION_STRATEGY_CLASS_NAME).equals(SPARK_CONSISTENT_BUCKET_EXECUTION_STRATEGY),
+            "Consistent hashing bucket index only supports clustering 
execution strategy : " + SPARK_CONSISTENT_BUCKET_EXECUTION_STRATEGY);

Review Comment:
   The PR only contains resize plan schedule of consistent bucket index for 
Flink Engine. Resize execution should be carried out by Spark engine. Flink 
resize does not support execution strategy.



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