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 org.apache.kafka.clients.producer.KafkaProducer<K,V>kafkaProducerDeprecated.protected StringtransactionalIdDeprecated.
-
Constructor Summary
Constructors Constructor Description FlinkKafkaInternalProducer(Properties properties)Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidabortTransaction()Deprecated.voidbeginTransaction()Deprecated.voidclose()Deprecated.voidclose(java.time.Duration duration)Deprecated.voidcommitTransaction()Deprecated.voidflush()Deprecated.protected static Enum<?>getEnum(String enumFullName)Deprecated.shortgetEpoch()Deprecated.protected static ObjectgetField(Object object, String fieldName)Deprecated.Gets and returns the fieldfieldNamefrom the given Objectobjectusing reflection.longgetProducerId()Deprecated.StringgetTransactionalId()Deprecated.intgetTransactionCoordinatorId()Deprecated.voidinitTransactions()Deprecated.protected static Objectinvoke(Object object, String methodName, Object... args)Deprecated.Map<org.apache.kafka.common.MetricName,? extends org.apache.kafka.common.Metric>metrics()Deprecated.List<org.apache.kafka.common.PartitionInfo>partitionsFor(String topic)Deprecated.voidresumeTransaction(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.voidsendOffsetsToTransaction(Map<org.apache.kafka.common.TopicPartition,org.apache.kafka.clients.consumer.OffsetAndMetadata> offsets, String consumerGroupId)Deprecated.voidsendOffsetsToTransaction(Map<org.apache.kafka.common.TopicPartition,org.apache.kafka.clients.consumer.OffsetAndMetadata> map, org.apache.kafka.clients.consumer.ConsumerGroupMetadata consumerGroupMetadata)Deprecated.protected static voidsetField(Object object, String fieldName, Object value)Deprecated.Sets the fieldfieldNameon the given Objectobjecttovalueusing reflection.
-
-
-
Constructor Detail
-
FlinkKafkaInternalProducer
public FlinkKafkaInternalProducer(Properties properties)
Deprecated.
-
-
Method Detail
-
initTransactions
public void initTransactions()
Deprecated.
-
beginTransaction
public void beginTransaction() throws org.apache.kafka.common.errors.ProducerFencedExceptionDeprecated.
-
commitTransaction
public void commitTransaction() throws org.apache.kafka.common.errors.ProducerFencedExceptionDeprecated.
-
abortTransaction
public void abortTransaction() throws org.apache.kafka.common.errors.ProducerFencedExceptionDeprecated.
-
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.
-
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.
-
send
public Future<org.apache.kafka.clients.producer.RecordMetadata> send(org.apache.kafka.clients.producer.ProducerRecord<K,V> record)
Deprecated.
-
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.
-
partitionsFor
public List<org.apache.kafka.common.PartitionInfo> partitionsFor(String topic)
Deprecated.
-
metrics
public Map<org.apache.kafka.common.MetricName,? extends org.apache.kafka.common.Metric> metrics()
Deprecated.
-
close
public void close()
Deprecated.
-
close
public void close(java.time.Duration duration)
Deprecated.
-
flush
public void flush()
Deprecated.
-
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 onKafkaProducer.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.
-
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 fieldfieldNamefrom the given Objectobjectusing reflection.
-
-