T
- The type of elements produced by the fetcher.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.
checkpointLock, NO_TIMESTAMPS_WATERMARKS, PERIODIC_WATERMARKS, PUNCTUATED_WATERMARKS, sourceContext, timestampWatermarkMode, useMetrics
Constructor and Description |
---|
Kafka010Fetcher(SourceFunction.SourceContext<T> sourceContext,
List<KafkaTopicPartition> assignedPartitions,
SerializedValue<AssignerWithPeriodicWatermarks<T>> watermarksPeriodic,
SerializedValue<AssignerWithPunctuatedWatermarks<T>> watermarksPunctuated,
ProcessingTimeService processingTimeProvider,
long autoWatermarkInterval,
ClassLoader userCodeClassLoader,
boolean enableCheckpointing,
String taskNameWithSubtasks,
MetricGroup metricGroup,
KeyedDeserializationSchema<T> deserializer,
Properties kafkaProperties,
long pollTimeout,
boolean useMetrics) |
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, commitInternalOffsetsToKafka, createKafkaPartitionHandle, runFetchLoop
addOffsetStateGauge, emitRecord, emitRecordWithTimestamp, emitRecordWithTimestampAndPeriodicWatermark, emitRecordWithTimestampAndPunctuatedWatermark, restoreOffsets, snapshotCurrentState, subscribedPartitions
public Kafka010Fetcher(SourceFunction.SourceContext<T> sourceContext, List<KafkaTopicPartition> assignedPartitions, SerializedValue<AssignerWithPeriodicWatermarks<T>> watermarksPeriodic, SerializedValue<AssignerWithPunctuatedWatermarks<T>> watermarksPunctuated, ProcessingTimeService processingTimeProvider, long autoWatermarkInterval, ClassLoader userCodeClassLoader, boolean enableCheckpointing, String taskNameWithSubtasks, MetricGroup metricGroup, KeyedDeserializationSchema<T> deserializer, Properties kafkaProperties, long pollTimeout, boolean useMetrics) 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–2017 The Apache Software Foundation. All rights reserved.