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,
Map<org.apache.flink.streaming.connectors.kafka.internals.KafkaTopicPartition,Long> assignedPartitionsWithInitialOffsets,
org.apache.flink.util.SerializedValue<AssignerWithPeriodicWatermarks<T>> watermarksPeriodic,
org.apache.flink.util.SerializedValue<AssignerWithPunctuatedWatermarks<T>> watermarksPunctuated,
ProcessingTimeService processingTimeProvider,
long autoWatermarkInterval,
ClassLoader userCodeClassLoader,
String taskNameWithSubtasks,
org.apache.flink.metrics.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,
org.apache.flink.streaming.connectors.kafka.internals.KafkaTopicPartitionState<org.apache.kafka.common.TopicPartition> partition,
long offset,
org.apache.kafka.clients.consumer.ConsumerRecord<?,?> consumerRecord) |
protected String |
getFetcherName() |
cancel, commitInternalOffsetsToKafka, createKafkaPartitionHandle, runFetchLoopaddOffsetStateGauge, emitRecord, emitRecordWithTimestamp, emitRecordWithTimestampAndPeriodicWatermark, emitRecordWithTimestampAndPunctuatedWatermark, snapshotCurrentState, subscribedPartitionStatespublic Kafka010Fetcher(SourceFunction.SourceContext<T> sourceContext, Map<org.apache.flink.streaming.connectors.kafka.internals.KafkaTopicPartition,Long> assignedPartitionsWithInitialOffsets, org.apache.flink.util.SerializedValue<AssignerWithPeriodicWatermarks<T>> watermarksPeriodic, org.apache.flink.util.SerializedValue<AssignerWithPunctuatedWatermarks<T>> watermarksPunctuated, ProcessingTimeService processingTimeProvider, long autoWatermarkInterval, ClassLoader userCodeClassLoader, String taskNameWithSubtasks, org.apache.flink.metrics.MetricGroup metricGroup, KeyedDeserializationSchema<T> deserializer, Properties kafkaProperties, long pollTimeout, boolean useMetrics) throws Exception
Exceptionprotected void emitRecord(T record, org.apache.flink.streaming.connectors.kafka.internals.KafkaTopicPartitionState<org.apache.kafka.common.TopicPartition> partition, long offset, org.apache.kafka.clients.consumer.ConsumerRecord<?,?> consumerRecord) throws Exception
emitRecord in class Kafka09Fetcher<T>Exceptionprotected KafkaConsumerCallBridge010 createCallBridge()
createCallBridge in class Kafka09Fetcher<T>protected String getFetcherName()
getFetcherName in class Kafka09Fetcher<T>Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.