leesf commented on code in PR #4958:
URL: https://github.com/apache/hudi/pull/4958#discussion_r917670432


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/config/HoodieWriteConfig.java:
##########
@@ -2650,6 +2679,18 @@ private void validate() {
       ValidationUtils.checkArgument(!(inlineCompact && inlineCompactSchedule), 
String.format("Either of inline compaction (%s) or "
               + "schedule inline compaction (%s) can be enabled. Both can't be 
set to true at the same time. %s, %s", 
HoodieCompactionConfig.INLINE_COMPACT.key(),
           HoodieCompactionConfig.SCHEDULE_INLINE_COMPACT.key(), inlineCompact, 
inlineCompactSchedule));
+
+      if (writeConfig.getIndexType() == HoodieIndex.IndexType.BUCKET && 
writeConfig.getBucketIndexEngineType() == 
HoodieIndex.BucketIndexEngineType.CONSISTENT_HASHING) {
+        if 
(!writeConfig.getClusteringPlanStrategyClass().equals(HoodieClusteringConfig.SPARK_CONSISTENT_BUCKET_CLUSTERING_PLAN_STRATEGY))
 {
+          LOG.warn("Force setting clustering plan strategy class to '" + 
HoodieClusteringConfig.SPARK_CONSISTENT_BUCKET_CLUSTERING_PLAN_STRATEGY + "' 
because of consistent hashing bucket index");

Review Comment:
   split the too long line



##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/config/HoodieWriteConfig.java:
##########
@@ -2650,6 +2679,18 @@ private void validate() {
       ValidationUtils.checkArgument(!(inlineCompact && inlineCompactSchedule), 
String.format("Either of inline compaction (%s) or "
               + "schedule inline compaction (%s) can be enabled. Both can't be 
set to true at the same time. %s, %s", 
HoodieCompactionConfig.INLINE_COMPACT.key(),
           HoodieCompactionConfig.SCHEDULE_INLINE_COMPACT.key(), inlineCompact, 
inlineCompactSchedule));
+
+      if (writeConfig.getIndexType() == HoodieIndex.IndexType.BUCKET && 
writeConfig.getBucketIndexEngineType() == 
HoodieIndex.BucketIndexEngineType.CONSISTENT_HASHING) {
+        if 
(!writeConfig.getClusteringPlanStrategyClass().equals(HoodieClusteringConfig.SPARK_CONSISTENT_BUCKET_CLUSTERING_PLAN_STRATEGY))
 {
+          LOG.warn("Force setting clustering plan strategy class to '" + 
HoodieClusteringConfig.SPARK_CONSISTENT_BUCKET_CLUSTERING_PLAN_STRATEGY + "' 
because of consistent hashing bucket index");
+          
writeConfig.setValue(HoodieClusteringConfig.PLAN_STRATEGY_CLASS_NAME, 
HoodieClusteringConfig.SPARK_CONSISTENT_BUCKET_CLUSTERING_PLAN_STRATEGY);
+        }
+
+        if 
(!writeConfig.getClusteringExecutionStrategyClass().equals(HoodieClusteringConfig.SPARK_CONSISTENT_BUCKET_EXECUTION_STRATEGY))
 {
+          LOG.warn("Force setting clustering execution strategy class to '" + 
HoodieClusteringConfig.SPARK_CONSISTENT_BUCKET_EXECUTION_STRATEGY + "' because 
of consistent hashing bucket index");

Review Comment:
   ditto



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