hudi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [incubator-hudi] n3nash commented on a change in pull request #1149: [WIP] [HUDI-472] Introduce configurations and new modes of sorting for bulk_insert
Date Fri, 03 Jan 2020 23:30:49 GMT
n3nash 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_r362993888
 
 

 ##########
 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:
   @yihua Yes, we do need to keep this functionality, at Uber as @vinothchandar pointed out,
uses this. We directly pass an implementation rather than a config.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message