Class KafkaFetcher<T>

  • Type Parameters:
    T - The type of elements produced by the fetcher.
    Direct Known Subclasses:
    KafkaShuffleFetcher

    @Internal
    public class KafkaFetcher<T>
    extends AbstractFetcher<T,​org.apache.kafka.common.TopicPartition>
    A fetcher that fetches data from Kafka brokers via the Kafka consumer API.
    • Constructor Detail

      • 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 Exception
        Throws:
        Exception