liming30 commented on code in PR #2306:
URL: https://github.com/apache/incubator-paimon/pull/2306#discussion_r1390983576


##########
paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/source/StaticFileStoreSplitEnumerator.java:
##########
@@ -65,59 +49,10 @@ public StaticFileStoreSplitEnumerator(
             @Nullable Snapshot snapshot,
             SplitAssigner splitAssigner,
             @Nullable DynamicPartitionFilteringInfo 
dynamicPartitionFilteringInfo) {
-        this.context = context;
-        this.snapshot = snapshot;
-        this.splitAssigner = splitAssigner;
+        super(context, snapshot, splitAssigner);
         this.dynamicPartitionFilteringInfo = dynamicPartitionFilteringInfo;
     }
 
-    @Override
-    public void start() {
-        // no resources to start
-    }
-
-    @Override
-    public void handleSplitRequest(int subtask, @Nullable String hostname) {
-        if (!context.registeredReaders().containsKey(subtask)) {
-            // reader failed between sending the request and now. skip this 
request.
-            return;
-        }
-
-        List<FileStoreSourceSplit> assignment = splitAssigner.getNext(subtask, 
hostname);
-        if (assignment.size() > 0) {
-            context.assignSplits(
-                    new SplitsAssignment<>(Collections.singletonMap(subtask, 
assignment)));
-        } else {
-            context.signalNoMoreSplits(subtask);
-        }
-    }
-
-    @Override
-    public void addSplitsBack(List<FileStoreSourceSplit> backSplits, int 
subtaskId) {
-        splitAssigner.addSplitsBack(subtaskId, backSplits);
-    }
-
-    @Override
-    public void addReader(int subtaskId) {
-        // this source is purely lazy-pull-based, nothing to do upon 
registration
-    }
-
-    @Override
-    public PendingSplitsCheckpoint snapshotState(long checkpointId) {
-        return new PendingSplitsCheckpoint(
-                splitAssigner.remainingSplits(), snapshot == null ? null : 
snapshot.id());
-    }
-
-    @Override
-    public void close() {
-        // no resources to close
-    }
-
-    @Nullable
-    public Snapshot snapshot() {
-        return snapshot;
-    }
-
     @Override
     public void handleSourceEvent(int subtaskId, SourceEvent sourceEvent) {
         if (sourceEvent instanceof DynamicFilteringEvent) {

Review Comment:
   Sounds great, I have addressed it according to the comment.



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