xushiyan commented on code in PR #18082:
URL: https://github.com/apache/hudi/pull/18082#discussion_r2766380446


##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/source/split/DefaultHoodieSplitProvider.java:
##########
@@ -37,29 +40,48 @@ public class DefaultHoodieSplitProvider implements 
HoodieSplitProvider {
   public static final int DEFAULT_SPLIT_QUEUE_SIZE = 20;
 
   private Queue<HoodieSourceSplit> pendingSplits;
+  private HoodieSplitAssigner splitAssigner;
 
-  public DefaultHoodieSplitProvider() {
+  public DefaultHoodieSplitProvider(HoodieSplitAssigner splitAssigner) {
     this.pendingSplits = new ConcurrentLinkedDeque<>();
+    this.splitAssigner = splitAssigner;
   }
 
   /**
    * Creates a DefaultHoodieSplitProvider with a custom comparator for 
ordering splits.
    *
-   * @param comparator the comparator to use for ordering splits
+   * @param comparator the comparator to use for ordering splits (must not be 
null)
+   * @param splitAssigner the assigner that assigns each split to a task ID 
(must not be null)
+   * @throws IllegalArgumentException if comparator is null
    */
-  public DefaultHoodieSplitProvider(SerializableComparator<HoodieSourceSplit> 
comparator) {
+  public DefaultHoodieSplitProvider(
+          SerializableComparator<HoodieSourceSplit> comparator,
+          HoodieSplitAssigner splitAssigner) {
     ValidationUtils.checkArgument(comparator != null,
         "The hoodie source split comparator can't be null");

Review Comment:
   I think we can just skip the null check, by convention, args should not be 
null, and make `nullable` when needed.



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