Class FlinkKafkaInternalProducer<K,V>

java.lang.Object
org.apache.flink.streaming.connectors.kafka.internals.FlinkKafkaInternalProducer<K,V>
All Implemented Interfaces:
Closeable, AutoCloseable, org.apache.kafka.clients.producer.Producer<K,V>

@PublicEvolving @Deprecated public class FlinkKafkaInternalProducer<K,V> extends Object implements org.apache.kafka.clients.producer.Producer<K,V>
Deprecated.
Internal flink kafka producer.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final org.apache.kafka.clients.producer.KafkaProducer<K,V>
    Deprecated.
     
    protected final String
    Deprecated.
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Deprecated.
     
    void
    Deprecated.
     
    void
    Deprecated.
     
    void
    close(java.time.Duration duration)
    Deprecated.
     
    void
    Deprecated.
     
    void
    Deprecated.
     
    protected static Enum<?>
    getEnum(String enumFullName)
    Deprecated.
     
    short
    Deprecated.
     
    protected static Object
    getField(Object object, String fieldName)
    Deprecated.
    Gets and returns the field fieldName from the given Object object using reflection.
    long
    Deprecated.
     
    Deprecated.
     
    int
    Deprecated.
     
    void
    Deprecated.
     
    protected static Object
    invoke(Object object, String methodName, Object... args)
    Deprecated.
     
    Map<org.apache.kafka.common.MetricName,? extends org.apache.kafka.common.Metric>
    Deprecated.
     
    List<org.apache.kafka.common.PartitionInfo>
    Deprecated.
     
    void
    resumeTransaction(long producerId, short epoch)
    Deprecated.
    Instead of obtaining producerId and epoch from the transaction coordinator, re-use previously obtained ones, so that we can resume transaction after a restart.
    Future<org.apache.kafka.clients.producer.RecordMetadata>
    send(org.apache.kafka.clients.producer.ProducerRecord<K,V> record)
    Deprecated.
     
    Future<org.apache.kafka.clients.producer.RecordMetadata>
    send(org.apache.kafka.clients.producer.ProducerRecord<K,V> record, org.apache.kafka.clients.producer.Callback callback)
    Deprecated.
     
    void
    sendOffsetsToTransaction(Map<org.apache.kafka.common.TopicPartition,org.apache.kafka.clients.consumer.OffsetAndMetadata> offsets, String consumerGroupId)
    Deprecated.
     
    void
    sendOffsetsToTransaction(Map<org.apache.kafka.common.TopicPartition,org.apache.kafka.clients.consumer.OffsetAndMetadata> map, org.apache.kafka.clients.consumer.ConsumerGroupMetadata consumerGroupMetadata)
    Deprecated.
     
    protected static void
    setField(Object object, String fieldName, Object value)
    Deprecated.
    Sets the field fieldName on the given Object object to value using reflection.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • kafkaProducer

      protected final org.apache.kafka.clients.producer.KafkaProducer<K,V> kafkaProducer
      Deprecated.
    • transactionalId

      @Nullable protected final String transactionalId
      Deprecated.
  • Constructor Details

    • FlinkKafkaInternalProducer

      public FlinkKafkaInternalProducer(Properties properties)
      Deprecated.
  • Method Details

    • initTransactions

      public void initTransactions()
      Deprecated.
      Specified by:
      initTransactions in interface org.apache.kafka.clients.producer.Producer<K,V>
    • beginTransaction

      public void beginTransaction() throws org.apache.kafka.common.errors.ProducerFencedException
      Deprecated.
      Specified by:
      beginTransaction in interface org.apache.kafka.clients.producer.Producer<K,V>
      Throws:
      org.apache.kafka.common.errors.ProducerFencedException
    • commitTransaction

      public void commitTransaction() throws org.apache.kafka.common.errors.ProducerFencedException
      Deprecated.
      Specified by:
      commitTransaction in interface org.apache.kafka.clients.producer.Producer<K,V>
      Throws:
      org.apache.kafka.common.errors.ProducerFencedException
    • abortTransaction

      public void abortTransaction() throws org.apache.kafka.common.errors.ProducerFencedException
      Deprecated.
      Specified by:
      abortTransaction in interface org.apache.kafka.clients.producer.Producer<K,V>
      Throws:
      org.apache.kafka.common.errors.ProducerFencedException
    • sendOffsetsToTransaction

      public void sendOffsetsToTransaction(Map<org.apache.kafka.common.TopicPartition,org.apache.kafka.clients.consumer.OffsetAndMetadata> offsets, String consumerGroupId) throws org.apache.kafka.common.errors.ProducerFencedException
      Deprecated.
      Specified by:
      sendOffsetsToTransaction in interface org.apache.kafka.clients.producer.Producer<K,V>
      Throws:
      org.apache.kafka.common.errors.ProducerFencedException
    • sendOffsetsToTransaction

      public void sendOffsetsToTransaction(Map<org.apache.kafka.common.TopicPartition,org.apache.kafka.clients.consumer.OffsetAndMetadata> map, org.apache.kafka.clients.consumer.ConsumerGroupMetadata consumerGroupMetadata) throws org.apache.kafka.common.errors.ProducerFencedException
      Deprecated.
      Specified by:
      sendOffsetsToTransaction in interface org.apache.kafka.clients.producer.Producer<K,V>
      Throws:
      org.apache.kafka.common.errors.ProducerFencedException
    • send

      public Future<org.apache.kafka.clients.producer.RecordMetadata> send(org.apache.kafka.clients.producer.ProducerRecord<K,V> record)
      Deprecated.
      Specified by:
      send in interface org.apache.kafka.clients.producer.Producer<K,V>
    • send

      public Future<org.apache.kafka.clients.producer.RecordMetadata> send(org.apache.kafka.clients.producer.ProducerRecord<K,V> record, org.apache.kafka.clients.producer.Callback callback)
      Deprecated.
      Specified by:
      send in interface org.apache.kafka.clients.producer.Producer<K,V>
    • partitionsFor

      public List<org.apache.kafka.common.PartitionInfo> partitionsFor(String topic)
      Deprecated.
      Specified by:
      partitionsFor in interface org.apache.kafka.clients.producer.Producer<K,V>
    • metrics

      public Map<org.apache.kafka.common.MetricName,? extends org.apache.kafka.common.Metric> metrics()
      Deprecated.
      Specified by:
      metrics in interface org.apache.kafka.clients.producer.Producer<K,V>
    • close

      public void close()
      Deprecated.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Specified by:
      close in interface org.apache.kafka.clients.producer.Producer<K,V>
    • close

      public void close(java.time.Duration duration)
      Deprecated.
      Specified by:
      close in interface org.apache.kafka.clients.producer.Producer<K,V>
    • flush

      public void flush()
      Deprecated.
      Specified by:
      flush in interface org.apache.kafka.clients.producer.Producer<K,V>
    • resumeTransaction

      public void resumeTransaction(long producerId, short epoch)
      Deprecated.
      Instead of obtaining producerId and epoch from the transaction coordinator, re-use previously obtained ones, so that we can resume transaction after a restart. Implementation of this method is based on KafkaProducer.initTransactions(). https://github.com/apache/kafka/commit/5d2422258cb975a137a42a4e08f03573c49a387e#diff-f4ef1afd8792cd2a2e9069cd7ddea630
    • getTransactionalId

      public String getTransactionalId()
      Deprecated.
    • getProducerId

      public long getProducerId()
      Deprecated.
    • getEpoch

      public short getEpoch()
      Deprecated.
    • getTransactionCoordinatorId

      @VisibleForTesting public int getTransactionCoordinatorId()
      Deprecated.
    • getEnum

      protected static Enum<?> getEnum(String enumFullName)
      Deprecated.
    • invoke

      protected static Object invoke(Object object, String methodName, Object... args)
      Deprecated.
    • getField

      protected static Object getField(Object object, String fieldName)
      Deprecated.
      Gets and returns the field fieldName from the given Object object using reflection.
    • setField

      protected static void setField(Object object, String fieldName, Object value)
      Deprecated.
      Sets the field fieldName on the given Object object to value using reflection.