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

  • All Implemented Interfaces:
    Runnable

    @PublicEvolving
    public class SplitFetcher<E,​SplitT extends org.apache.flink.api.connector.source.SourceSplit>
    extends Object
    implements Runnable
    The internal fetcher runnable responsible for polling message from the external system.
    • Method Detail

      • run

        public void run()
        Specified by:
        run in interface Runnable
      • addSplits

        public void addSplits​(List<SplitT> splitsToAdd)
        Add splits to the split fetcher. This operation is asynchronous.
        Parameters:
        splitsToAdd - the splits to add.
      • removeSplits

        public void removeSplits​(List<SplitT> splitsToRemove)
        Notice the split fetcher that some splits finished. This operation is asynchronous.
        Parameters:
        splitsToRemove - the splits need to be removed.
      • pauseOrResumeSplits

        public void pauseOrResumeSplits​(Collection<SplitT> splitsToPause,
                                        Collection<SplitT> splitsToResume)
        Called when some splits of this source instance progressed too much beyond the global watermark of all subtasks. If the split reader implements SplitReader, it will relay the information asynchronously through the split fetcher thread.
        Parameters:
        splitsToPause - the splits to pause
        splitsToResume - the splits to resume
      • fetcherId

        public int fetcherId()
      • shutdown

        public void shutdown()
        Shutdown the split fetcher.
      • pause

        public void pause()
      • resume

        public void resume()