Class KafkaFetcher<T>

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

    @Internal
    @Deprecated
    public class KafkaFetcher<T>
    extends AbstractFetcher<T,​org.apache.kafka.common.TopicPartition>
    Deprecated.
    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
        Deprecated.
        Throws:
        Exception
    • Method Detail

      • cancel

        public void cancel()
        Deprecated.
        Specified by:
        cancel in class AbstractFetcher<T,​org.apache.kafka.common.TopicPartition>
      • getFetcherName

        protected String getFetcherName()
        Deprecated.
        Gets the name of this fetcher, for thread naming and logging purposes.
      • partitionConsumerRecordsHandler

        protected void partitionConsumerRecordsHandler​(List<org.apache.kafka.clients.consumer.ConsumerRecord<byte[],​byte[]>> partitionRecords,
                                                       KafkaTopicPartitionState<T,​org.apache.kafka.common.TopicPartition> partition)
                                                throws Exception
        Deprecated.
        Throws:
        Exception
      • createKafkaPartitionHandle

        public org.apache.kafka.common.TopicPartition createKafkaPartitionHandle​(KafkaTopicPartition partition)
        Deprecated.
        Description copied from class: AbstractFetcher
        Creates the Kafka version specific representation of the given topic partition.
        Specified by:
        createKafkaPartitionHandle in class AbstractFetcher<T,​org.apache.kafka.common.TopicPartition>
        Parameters:
        partition - The Flink representation of the Kafka topic partition.
        Returns:
        The version-specific Kafka representation of the Kafka topic partition.