wuwenchi commented on code in PR #7834:
URL: https://github.com/apache/hudi/pull/7834#discussion_r1157482664


##########
hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/execution/bulkinsert/BulkInsertInternalPartitionerFactory.java:
##########
@@ -38,9 +38,12 @@ public static BulkInsertPartitioner get(HoodieTable table,
   public static BulkInsertPartitioner get(HoodieTable table,
                                           HoodieWriteConfig config,
                                           boolean enforceNumOutputPartitions) {
-    if (config.getIndexType().equals(HoodieIndex.IndexType.BUCKET)
-        && 
config.getBucketIndexEngineType().equals(HoodieIndex.BucketIndexEngineType.CONSISTENT_HASHING))
 {
-      return new RDDConsistentBucketPartitioner(table);
+    if (config.getIndexType().equals(HoodieIndex.IndexType.BUCKET)) {
+      if 
(config.getBucketIndexEngineType().equals(HoodieIndex.BucketIndexEngineType.CONSISTENT_HASHING))
 {
+        return new RDDConsistentBucketPartitioner(table);
+      } else if 
(config.getBucketIndexEngineType().equals(HoodieIndex.BucketIndexEngineType.SIMPLE))
 {
+        return new RDDSimpleBucketPartitioner(table);
+      }

Review Comment:
   `getBucketIndexEngineType` is to obtain the value from `enum 
BucketIndexEngineType`. If the user sets an unsupported type, this function 
will directly throw an exception, so there is maybe no need to throw an 
exception again here.



##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/index/bucket/HoodieSimpleBucketIndex.java:
##########
@@ -44,7 +44,7 @@ public HoodieSimpleBucketIndex(HoodieWriteConfig config) {
     super(config);
   }
 
-  private Map<Integer, HoodieRecordLocation> 
loadPartitionBucketIdFileIdMapping(
+  public Map<Integer, HoodieRecordLocation> loadPartitionBucketIdFileIdMapping(

Review Comment:
   done



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