use of org.apache.flink.connector.base.source.reader.fetcher.SplitFetcherTask in project flink by apache.
the class KafkaSourceFetcherManager method enqueueOffsetsCommitTask.
private void enqueueOffsetsCommitTask(SplitFetcher<ConsumerRecord<byte[], byte[]>, KafkaPartitionSplit> splitFetcher, Map<TopicPartition, OffsetAndMetadata> offsetsToCommit, OffsetCommitCallback callback) {
KafkaPartitionSplitReader kafkaReader = (KafkaPartitionSplitReader) splitFetcher.getSplitReader();
splitFetcher.enqueueTask(new SplitFetcherTask() {
@Override
public boolean run() throws IOException {
kafkaReader.notifyCheckpointComplete(offsetsToCommit, callback);
return true;
}
@Override
public void wakeUp() {
}
});
}
Aggregations