wombatu-kun commented on code in PR #10942:
URL: https://github.com/apache/hudi/pull/10942#discussion_r1546190914


##########
hudi-client/hudi-java-client/src/main/java/org/apache/hudi/execution/bulkinsert/JavaGlobalSortPartitioner.java:
##########
@@ -31,12 +32,21 @@
  *
  * @param <T> HoodieRecordPayload type
  */
-public class JavaGlobalSortPartitioner<T>
-    implements BulkInsertPartitioner<List<HoodieRecord<T>>> {
+public class JavaGlobalSortPartitioner<T> implements 
BulkInsertPartitioner<List<HoodieRecord<T>>> {
+
+  public JavaGlobalSortPartitioner() {
+  }
+
+  /**
+   * Constructor to create as UserDefinedBulkInsertPartitioner class via 
reflection
+   * @param config HoodieWriteConfig

Review Comment:
   Before this fix:  
   if user wants to use JavaGlobalSortPartitioner and he set 
`hoodie.bulkinsert.user.defined.partitioner.class=org.apache.hudi.execution.bulkinsert.JavaGlobalSortPartitioner`,
 it will not work because this partitioner could not be instantiated via 
reflection (as it has no constructor with writeConfig parameter).
   We create this constructor to add ability to use JavaGlobalSortPartitioner 
as user defined partitioner just by setting it's class name in writeConfig.  
   
   Don't know how to explain more clear. Let's wait for the author's reply.



-- 
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: commits-unsubscr...@hudi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to