PatrickRen commented on code in PR #24171:
URL: https://github.com/apache/flink/pull/24171#discussion_r1464919545


##########
flink-connectors/flink-connector-base/src/main/java/org/apache/flink/connector/base/source/reader/fetcher/SplitFetcherManager.java:
##########
@@ -238,6 +274,15 @@ public boolean maybeShutdownFinishedFetchers() {
         return fetchers.isEmpty();
     }
 
+    /**
+     * Return the queue contains data produced by split fetchers.This method 
is Internal and only
+     * used in {@link SourceReaderBase}.
+     */
+    @Internal
+    public FutureCompletingBlockingQueue getQueue() {

Review Comment:
   It's better to specify the type parameter of 
`FutureCompletingBlockingQueue`, which should be `RecordsWithSplitIds<E>`



##########
flink-connectors/flink-connector-base/src/main/java/org/apache/flink/connector/base/source/reader/SingleThreadMultiplexSourceReaderBase.java:
##########
@@ -88,6 +86,7 @@ public SingleThreadMultiplexSourceReaderBase(
      * RecordEmitter, Configuration, SourceReaderContext)}, but accepts a 
specific {@link
      * FutureCompletingBlockingQueue}.
      */
+    @Deprecated

Review Comment:
   Please add JavaDoc for all deprecations



##########
flink-connectors/flink-connector-base/src/main/java/org/apache/flink/connector/base/source/reader/fetcher/SplitFetcherManager.java:
##########
@@ -151,6 +157,36 @@ public void accept(Throwable t) {
         this.closed = false;
     }
 
+    /**
+     * Create a split fetcher manager.
+     *
+     * @param splitReaderFactory a supplier that could be used to create split 
readers.
+     * @param configuration the configuration of this fetcher manager.
+     */
+    public SplitFetcherManager(
+            Supplier<SplitReader<E, SplitT>> splitReaderFactory, Configuration 
configuration) {
+        this(splitReaderFactory, configuration, (ignore) -> {});
+    }
+
+    /**
+     * Create a split fetcher manager.
+     *
+     * @param splitReaderFactory a supplier that could be used to create split 
readers.
+     * @param configuration the configuration of this fetcher manager.
+     * @param splitFinishedHook Hook for handling finished splits in split 
fetchers.
+     */
+    public SplitFetcherManager(
+            Supplier<SplitReader<E, SplitT>> splitReaderFactory,
+            Configuration configuration,
+            Consumer<Collection<String>> splitFinishedHook) {
+        this(

Review Comment:
   What about using a non-deprecated constructor here? 



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