T - The decoded message type for flink.@Internal public abstract class PulsarFetcherManagerBase<T> extends org.apache.flink.connector.base.source.reader.fetcher.SplitFetcherManager<PulsarMessage<T>,PulsarPartitionSplit>
| Modifier | Constructor and Description |
|---|---|
protected |
PulsarFetcherManagerBase(org.apache.flink.connector.base.source.reader.synchronization.FutureCompletingBlockingQueue<org.apache.flink.connector.base.source.reader.RecordsWithSplitIds<PulsarMessage<T>>> elementsQueue,
java.util.function.Supplier<org.apache.flink.connector.base.source.reader.splitreader.SplitReader<PulsarMessage<T>,PulsarPartitionSplit>> splitReaderSupplier)
Creates a new SplitFetcherManager with multiple I/O threads.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addSplits(List<PulsarPartitionSplit> splitsToAdd)
Override this method for supporting multiple thread fetching, one fetcher thread for one
split.
|
protected org.apache.flink.connector.base.source.reader.fetcher.SplitFetcher<PulsarMessage<T>,PulsarPartitionSplit> |
getOrCreateFetcher(String splitId) |
protected void |
startFetcher(org.apache.flink.connector.base.source.reader.fetcher.SplitFetcher<PulsarMessage<T>,PulsarPartitionSplit> fetcher) |
protected PulsarFetcherManagerBase(org.apache.flink.connector.base.source.reader.synchronization.FutureCompletingBlockingQueue<org.apache.flink.connector.base.source.reader.RecordsWithSplitIds<PulsarMessage<T>>> elementsQueue, java.util.function.Supplier<org.apache.flink.connector.base.source.reader.splitreader.SplitReader<PulsarMessage<T>,PulsarPartitionSplit>> splitReaderSupplier)
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 SourceReaderBase.splitReaderSupplier - The factory for the split reader that connects to the sourcepublic void addSplits(List<PulsarPartitionSplit> splitsToAdd)
addSplits in class org.apache.flink.connector.base.source.reader.fetcher.SplitFetcherManager<PulsarMessage<T>,PulsarPartitionSplit>protected void startFetcher(org.apache.flink.connector.base.source.reader.fetcher.SplitFetcher<PulsarMessage<T>,PulsarPartitionSplit> fetcher)
startFetcher in class org.apache.flink.connector.base.source.reader.fetcher.SplitFetcherManager<PulsarMessage<T>,PulsarPartitionSplit>protected org.apache.flink.connector.base.source.reader.fetcher.SplitFetcher<PulsarMessage<T>,PulsarPartitionSplit> getOrCreateFetcher(String splitId)
Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.