This is an automated email from the ASF dual-hosted git repository.

tangyun pushed a commit to branch release-1.17
in repository https://gitbox.apache.org/repos/asf/flink.git


The following commit(s) were added to refs/heads/release-1.17 by this push:
     new 8acec2c14a2 [FLINK-31324][connector] Reintroduce previous 
SingleThreadFetcherManager constructor and mark it as deprecated
8acec2c14a2 is described below

commit 8acec2c14a2a56b9293354693008cc9c3e77692e
Author: Yun Tang <[email protected]>
AuthorDate: Sun Mar 5 00:04:33 2023 +0800

    [FLINK-31324][connector] Reintroduce previous SingleThreadFetcherManager 
constructor and mark it as deprecated
    
    This closes #22094.
---
 .../reader/fetcher/SingleThreadFetcherManager.java   | 20 ++++++++++++++++++++
 .../source/reader/fetcher/SplitFetcherManager.java   |  2 ++
 2 files changed, 22 insertions(+)

diff --git 
a/flink-connectors/flink-connector-base/src/main/java/org/apache/flink/connector/base/source/reader/fetcher/SingleThreadFetcherManager.java
 
b/flink-connectors/flink-connector-base/src/main/java/org/apache/flink/connector/base/source/reader/fetcher/SingleThreadFetcherManager.java
index 5f2fad06b2a..3b73aa787ef 100644
--- 
a/flink-connectors/flink-connector-base/src/main/java/org/apache/flink/connector/base/source/reader/fetcher/SingleThreadFetcherManager.java
+++ 
b/flink-connectors/flink-connector-base/src/main/java/org/apache/flink/connector/base/source/reader/fetcher/SingleThreadFetcherManager.java
@@ -53,6 +53,25 @@ public class SingleThreadFetcherManager<E, SplitT extends 
SourceSplit>
      *     the same queue instance that is also passed to the {@link 
SourceReaderBase}.
      * @param splitReaderSupplier The factory for the split reader that 
connects to the source
      *     system.
+     * @deprecated Please use {@link 
#SingleThreadFetcherManager(FutureCompletingBlockingQueue,
+     *     Supplier, Configuration)} instead.
+     */
+    @Deprecated
+    public SingleThreadFetcherManager(
+            FutureCompletingBlockingQueue<RecordsWithSplitIds<E>> 
elementsQueue,
+            Supplier<SplitReader<E, SplitT>> splitReaderSupplier) {
+        this(elementsQueue, splitReaderSupplier, new Configuration());
+    }
+
+    /**
+     * Creates a new SplitFetcherManager with a single I/O threads.
+     *
+     * @param elementsQueue The queue that is used to hand over data from the 
I/O thread (the
+     *     fetchers) to the reader (which emits the records and book-keeps the 
state. This must be
+     *     the same queue instance that is also passed to the {@link 
SourceReaderBase}.
+     * @param splitReaderSupplier The factory for the split reader that 
connects to the source
+     *     system.
+     * @param configuration The configuration to create the fetcher manager.
      */
     public SingleThreadFetcherManager(
             FutureCompletingBlockingQueue<RecordsWithSplitIds<E>> 
elementsQueue,
@@ -69,6 +88,7 @@ public class SingleThreadFetcherManager<E, SplitT extends 
SourceSplit>
      *     the same queue instance that is also passed to the {@link 
SourceReaderBase}.
      * @param splitReaderSupplier The factory for the split reader that 
connects to the source
      *     system.
+     * @param configuration The configuration to create the fetcher manager.
      * @param splitFinishedHook Hook for handling finished splits in split 
fetchers
      */
     @VisibleForTesting
diff --git 
a/flink-connectors/flink-connector-base/src/main/java/org/apache/flink/connector/base/source/reader/fetcher/SplitFetcherManager.java
 
b/flink-connectors/flink-connector-base/src/main/java/org/apache/flink/connector/base/source/reader/fetcher/SplitFetcherManager.java
index ec128a26f07..72f5a554106 100644
--- 
a/flink-connectors/flink-connector-base/src/main/java/org/apache/flink/connector/base/source/reader/fetcher/SplitFetcherManager.java
+++ 
b/flink-connectors/flink-connector-base/src/main/java/org/apache/flink/connector/base/source/reader/fetcher/SplitFetcherManager.java
@@ -98,6 +98,7 @@ public abstract class SplitFetcherManager<E, SplitT extends 
SourceSplit> {
      *
      * @param elementsQueue the queue that split readers will put elements 
into.
      * @param splitReaderFactory a supplier that could be used to create split 
readers.
+     * @param configuration the configuration of this fetcher manager.
      */
     public SplitFetcherManager(
             FutureCompletingBlockingQueue<RecordsWithSplitIds<E>> 
elementsQueue,
@@ -111,6 +112,7 @@ public abstract class SplitFetcherManager<E, SplitT extends 
SourceSplit> {
      *
      * @param elementsQueue the queue that split readers will put elements 
into.
      * @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.
      */
     @VisibleForTesting

Reply via email to