Class SingleThreadFetcherManager<E,SplitT extends org.apache.flink.api.connector.source.SourceSplit>

java.lang.Object
org.apache.flink.connector.base.source.reader.fetcher.SplitFetcherManager<E,SplitT>
org.apache.flink.connector.base.source.reader.fetcher.SingleThreadFetcherManager<E,SplitT>

@PublicEvolving public class SingleThreadFetcherManager<E,SplitT extends org.apache.flink.api.connector.source.SourceSplit> extends SplitFetcherManager<E,SplitT>
A Fetcher Manager with a single fetching thread (I/O thread) that handles all splits concurrently.

This pattern is, for example, useful for connectors like File Readers, Apache Kafka Readers, etc. In the example of Kafka, there is a single thread that reads all splits (topic partitions) via the same client. In the example of the file source, there is a single thread that reads the files after another.

  • Constructor Details

    • SingleThreadFetcherManager

      public SingleThreadFetcherManager(Supplier<SplitReader<E,SplitT>> splitReaderSupplier)
      Creates a new SplitFetcherManager with a single I/O threads.
      Parameters:
      splitReaderSupplier - The factory for the split reader that connects to the source system.
    • SingleThreadFetcherManager

      public SingleThreadFetcherManager(Supplier<SplitReader<E,SplitT>> splitReaderSupplier, org.apache.flink.configuration.Configuration configuration)
      Creates a new SplitFetcherManager with a single I/O threads.
      Parameters:
      splitReaderSupplier - The factory for the split reader that connects to the source system.
      configuration - The configuration to create the fetcher manager.
    • SingleThreadFetcherManager

      public SingleThreadFetcherManager(Supplier<SplitReader<E,SplitT>> splitReaderSupplier, org.apache.flink.configuration.Configuration configuration, Consumer<Collection<String>> splitFinishedHook)
      Creates a new SplitFetcherManager with a single I/O threads.
      Parameters:
      splitReaderSupplier - The factory for the split reader that connects to the source system.
      configuration - The configuration to create the fetcher manager.
      splitFinishedHook - Hook for handling finished splits in split fetchers
  • Method Details