vinothchandar commented on a change in pull request #1149: [WIP] [HUDI-472] 
Introduce configurations and new modes of sorting for bulk_insert
URL: https://github.com/apache/incubator-hudi/pull/1149#discussion_r362278533
 
 

 ##########
 File path: hudi-client/src/main/java/org/apache/hudi/HoodieWriteClient.java
 ##########
 @@ -367,20 +370,30 @@ public static SparkConf registerClasses(SparkConf conf) {
     }
   }
 
+  private BulkInsertMapFunction<T> getBulkInsertMapFunction(
+      boolean isSorted, String commitTime, HoodieWriteConfig config, 
HoodieTable<T> hoodieTable,
+      List<String> fileIDPrefixes) {
+    if (isSorted) {
+      return new BulkInsertMapFunctionForSortedRecords(
+          commitTime, config, hoodieTable, fileIDPrefixes);
+    }
+    return new BulkInsertMapFunctionForNonSortedRecords(
+        commitTime, config, hoodieTable, fileIDPrefixes);
+  }
+
   private JavaRDD<WriteStatus> bulkInsertInternal(JavaRDD<HoodieRecord<T>> 
dedupedRecords, String commitTime,
       HoodieTable<T> table, Option<UserDefinedBulkInsertPartitioner> 
bulkInsertPartitioner) {
 
 Review comment:
   does it make sense to still have a separate 
`UserDefinedBulkInsertPartitioner` ? could we just combine this into 
`BulkInsertInternalPartitioner` ? 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to