loserwang1024 opened a new pull request, #24171: URL: https://github.com/apache/flink/pull/24171
## What is the purpose of the change As shown in [FLIP-389](https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=278465498), this PR has 2 goals: - To expose the SplitFetcherManager / SingleThreadFetcheManager as Public, allowing connector developers to easily create their own threading models in the SourceReaderBase. - To hide the element queue from the connector developers and make SplitFetcherManager the only owner class of the queue ## Brief change log - By exposing the SplitFetcherManager / SingleThreadFetcheManager, connector developers can easily create their own threading models in the SourceReaderBase, by implementing addSplits(), removeSplits() and maybeShutdownFinishedFetchers() functions. - Note that the SplitFetcher constructor is package private, so users can only create SplitFetchers via SplitFetcherManager.createSplitFetcher(). This ensures each SplitFetcher is always owned by the SplitFetcherManager. - This FLIP essentially embedded the element queue (a FutureCompletingBlockingQueue) instance into the SplitFetcherManager. This hides the element queue from the connector developers and simplifies the SourceReaderBase to consist of only SplitFetcherManager and RecordEmitter as major components. ## Verifying this change This change is already covered by existing tests, such as HybridSourceReaderTest and SplitFetcherManagerTest. ## Does this pull request potentially affect one of the following parts: - Dependencies (does it add or upgrade a dependency): (no) - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (yes) - The serializers: ( no ) - The runtime per-record code paths (performance sensitive): ( no ) - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (no) - The S3 file system connector: (no) ## Documentation - Does this pull request introduce a new feature? no - how is the feature documented?https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=278465498 -- 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]
