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(org.apache.flink.streaming.api.functions.source.SourceFunction.SourceContext<T> sourceContext,
List<org.apache.flink.streaming.connectors.kafka.internals.KafkaTopicPartition> assignedPartitions,
org.apache.flink.util.SerializedValue<org.apache.flink.streaming.api.functions.AssignerWithPeriodicWatermarks<T>> watermarksPeriodic,
org.apache.flink.util.SerializedValue<org.apache.flink.streaming.api.functions.AssignerWithPunctuatedWatermarks<T>> watermarksPunctuated,
org.apache.flink.streaming.runtime.tasks.ProcessingTimeService processingTimeProvider,
long autoWatermarkInterval,
ClassLoader userCodeClassLoader,
boolean enableCheckpointing,
String taskNameWithSubtasks,
org.apache.flink.metrics.MetricGroup metricGroup,
org.apache.flink.streaming.util.serialization.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, restoreOffsets, snapshotCurrentState, subscribedPartitionspublic Kafka010Fetcher(org.apache.flink.streaming.api.functions.source.SourceFunction.SourceContext<T> sourceContext, List<org.apache.flink.streaming.connectors.kafka.internals.KafkaTopicPartition> assignedPartitions, org.apache.flink.util.SerializedValue<org.apache.flink.streaming.api.functions.AssignerWithPeriodicWatermarks<T>> watermarksPeriodic, org.apache.flink.util.SerializedValue<org.apache.flink.streaming.api.functions.AssignerWithPunctuatedWatermarks<T>> watermarksPunctuated, org.apache.flink.streaming.runtime.tasks.ProcessingTimeService processingTimeProvider, long autoWatermarkInterval, ClassLoader userCodeClassLoader, boolean enableCheckpointing, String taskNameWithSubtasks, org.apache.flink.metrics.MetricGroup metricGroup, org.apache.flink.streaming.util.serialization.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.