T
- The type of elements produced by the fetcher.@Internal public class Kafka010Fetcher<T> extends Kafka09Fetcher<T>
This fetcher re-uses basically all functionality of the 0.9 fetcher. It only additionally takes the KafkaRecord-attached timestamp and attaches it to the Flink records.
sourceContext, unassignedPartitionsQueue
Constructor and Description |
---|
Kafka010Fetcher(SourceFunction.SourceContext<T> sourceContext,
Map<KafkaTopicPartition,Long> assignedPartitionsWithInitialOffsets,
SerializedValue<AssignerWithPeriodicWatermarks<T>> watermarksPeriodic,
SerializedValue<AssignerWithPunctuatedWatermarks<T>> watermarksPunctuated,
ProcessingTimeService processingTimeProvider,
long autoWatermarkInterval,
ClassLoader userCodeClassLoader,
String taskNameWithSubtasks,
KafkaDeserializationSchema<T> deserializer,
Properties kafkaProperties,
long pollTimeout,
MetricGroup subtaskMetricGroup,
MetricGroup consumerMetricGroup,
boolean useMetrics,
FlinkConnectorRateLimiter rateLimiter) |
Modifier and Type | Method and Description |
---|---|
protected KafkaConsumerCallBridge010 |
createCallBridge()
This method needs to be overridden because Kafka broke binary compatibility between 0.9 and 0.10,
changing binary signatures.
|
protected void |
emitRecord(T record,
KafkaTopicPartitionState<org.apache.kafka.common.TopicPartition> partition,
long offset,
org.apache.kafka.clients.consumer.ConsumerRecord<?,?> consumerRecord) |
protected String |
getFetcherName()
Gets the name of this fetcher, for thread naming and logging purposes.
|
cancel, createKafkaPartitionHandle, doCommitInternalOffsetsToKafka, runFetchLoop
addDiscoveredPartitions, commitInternalOffsetsToKafka, emitRecord, emitRecordWithTimestamp, snapshotCurrentState, subscribedPartitionStates
public Kafka010Fetcher(SourceFunction.SourceContext<T> sourceContext, Map<KafkaTopicPartition,Long> assignedPartitionsWithInitialOffsets, SerializedValue<AssignerWithPeriodicWatermarks<T>> watermarksPeriodic, SerializedValue<AssignerWithPunctuatedWatermarks<T>> watermarksPunctuated, ProcessingTimeService processingTimeProvider, long autoWatermarkInterval, ClassLoader userCodeClassLoader, String taskNameWithSubtasks, KafkaDeserializationSchema<T> deserializer, Properties kafkaProperties, long pollTimeout, MetricGroup subtaskMetricGroup, MetricGroup consumerMetricGroup, boolean useMetrics, FlinkConnectorRateLimiter rateLimiter) throws Exception
Exception
protected void emitRecord(T record, KafkaTopicPartitionState<org.apache.kafka.common.TopicPartition> partition, long offset, org.apache.kafka.clients.consumer.ConsumerRecord<?,?> consumerRecord) throws Exception
emitRecord
in class Kafka09Fetcher<T>
Exception
protected KafkaConsumerCallBridge010 createCallBridge()
createCallBridge
in class Kafka09Fetcher<T>
protected String getFetcherName()
Kafka09Fetcher
getFetcherName
in class Kafka09Fetcher<T>
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.