Class KafkaFetcher<T>
java.lang.Object
org.apache.flink.streaming.connectors.kafka.internals.AbstractFetcher<T,org.apache.kafka.common.TopicPartition>
org.apache.flink.streaming.connectors.kafka.internals.KafkaFetcher<T>
- Type Parameters:
T- The type of elements produced by the fetcher.
- Direct Known Subclasses:
KafkaShuffleFetcher
@Internal
@Deprecated
public class KafkaFetcher<T>
extends AbstractFetcher<T,org.apache.kafka.common.TopicPartition>
Deprecated.
A fetcher that fetches data from Kafka brokers via the Kafka consumer API.
-
Field Summary
Fields inherited from class org.apache.flink.streaming.connectors.kafka.internals.AbstractFetcher
checkpointLock, sourceContext, unassignedPartitionsQueue, watermarkOutput -
Constructor Summary
ConstructorsConstructorDescriptionKafkaFetcher(org.apache.flink.streaming.api.functions.source.SourceFunction.SourceContext<T> sourceContext, Map<KafkaTopicPartition, Long> assignedPartitionsWithInitialOffsets, org.apache.flink.util.SerializedValue<org.apache.flink.api.common.eventtime.WatermarkStrategy<T>> watermarkStrategy, org.apache.flink.streaming.runtime.tasks.ProcessingTimeService processingTimeProvider, long autoWatermarkInterval, ClassLoader userCodeClassLoader, String taskNameWithSubtasks, KafkaDeserializationSchema<T> deserializer, Properties kafkaProperties, long pollTimeout, org.apache.flink.metrics.MetricGroup subtaskMetricGroup, org.apache.flink.metrics.MetricGroup consumerMetricGroup, boolean useMetrics) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionvoidcancel()Deprecated.org.apache.kafka.common.TopicPartitioncreateKafkaPartitionHandle(KafkaTopicPartition partition) Deprecated.Creates the Kafka version specific representation of the given topic partition.protected voiddoCommitInternalOffsetsToKafka(Map<KafkaTopicPartition, Long> offsets, KafkaCommitCallback commitCallback) Deprecated.protected StringDeprecated.Gets the name of this fetcher, for thread naming and logging purposes.protected voidpartitionConsumerRecordsHandler(List<org.apache.kafka.clients.consumer.ConsumerRecord<byte[], byte[]>> partitionRecords, KafkaTopicPartitionState<T, org.apache.kafka.common.TopicPartition> partition) Deprecated.voidDeprecated.Methods inherited from class org.apache.flink.streaming.connectors.kafka.internals.AbstractFetcher
addDiscoveredPartitions, commitInternalOffsetsToKafka, emitRecordsWithTimestamps, snapshotCurrentState, subscribedPartitionStates
-
Constructor Details
-
KafkaFetcher
public KafkaFetcher(org.apache.flink.streaming.api.functions.source.SourceFunction.SourceContext<T> sourceContext, Map<KafkaTopicPartition, Long> assignedPartitionsWithInitialOffsets, org.apache.flink.util.SerializedValue<org.apache.flink.api.common.eventtime.WatermarkStrategy<T>> watermarkStrategy, org.apache.flink.streaming.runtime.tasks.ProcessingTimeService processingTimeProvider, long autoWatermarkInterval, ClassLoader userCodeClassLoader, String taskNameWithSubtasks, KafkaDeserializationSchema<T> deserializer, Properties kafkaProperties, long pollTimeout, org.apache.flink.metrics.MetricGroup subtaskMetricGroup, org.apache.flink.metrics.MetricGroup consumerMetricGroup, boolean useMetrics) throws ExceptionDeprecated.- Throws:
Exception
-
-
Method Details
-
runFetchLoop
Deprecated.- Specified by:
runFetchLoopin classAbstractFetcher<T,org.apache.kafka.common.TopicPartition> - Throws:
Exception
-
cancel
public void cancel()Deprecated.- Specified by:
cancelin classAbstractFetcher<T,org.apache.kafka.common.TopicPartition>
-
getFetcherName
Deprecated.Gets the name of this fetcher, for thread naming and logging purposes. -
partitionConsumerRecordsHandler
protected void partitionConsumerRecordsHandler(List<org.apache.kafka.clients.consumer.ConsumerRecord<byte[], byte[]>> partitionRecords, KafkaTopicPartitionState<T, throws Exceptionorg.apache.kafka.common.TopicPartition> partition) Deprecated.- Throws:
Exception
-
createKafkaPartitionHandle
public org.apache.kafka.common.TopicPartition createKafkaPartitionHandle(KafkaTopicPartition partition) Deprecated.Description copied from class:AbstractFetcherCreates the Kafka version specific representation of the given topic partition.- Specified by:
createKafkaPartitionHandlein classAbstractFetcher<T,org.apache.kafka.common.TopicPartition> - Parameters:
partition- The Flink representation of the Kafka topic partition.- Returns:
- The version-specific Kafka representation of the Kafka topic partition.
-
doCommitInternalOffsetsToKafka
protected void doCommitInternalOffsetsToKafka(Map<KafkaTopicPartition, Long> offsets, @Nonnull KafkaCommitCallback commitCallback) throws ExceptionDeprecated.- Specified by:
doCommitInternalOffsetsToKafkain classAbstractFetcher<T,org.apache.kafka.common.TopicPartition> - Throws:
Exception
-