Class SplitFetcher<E,SplitT extends org.apache.flink.api.connector.source.SourceSplit>
- java.lang.Object
-
- org.apache.flink.connector.base.source.reader.fetcher.SplitFetcher<E,SplitT>
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddSplits(List<SplitT> splitsToAdd)Add splits to the split fetcher.voidenqueueTask(SplitFetcherTask task)intfetcherId()SplitReader<E,SplitT>getSplitReader()voidpause()voidpauseOrResumeSplits(Collection<SplitT> splitsToPause, Collection<SplitT> splitsToResume)Called when some splits of this source instance progressed too much beyond the global watermark of all subtasks.voidremoveSplits(List<SplitT> splitsToRemove)Notice the split fetcher that some splits finished.voidresume()voidrun()voidshutdown()Shutdown the split fetcher.
-
-
-
Method Detail
-
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 implementsSplitReader, it will relay the information asynchronously through the split fetcher thread.- Parameters:
splitsToPause- the splits to pausesplitsToResume- the splits to resume
-
enqueueTask
public void enqueueTask(SplitFetcherTask task)
-
getSplitReader
public SplitReader<E,SplitT> getSplitReader()
-
fetcherId
public int fetcherId()
-
shutdown
public void shutdown()
Shutdown the split fetcher.
-
pause
public void pause()
-
resume
public void resume()
-
-