类 KafkaNoTransactionSender<K,V>
- java.lang.Object
-
- org.apache.seatunnel.connectors.seatunnel.kafka.sink.KafkaNoTransactionSender<K,V>
-
- 类型参数:
K- key type.V- value type.
- 所有已实现的接口:
AutoCloseable,KafkaProduceSender<K,V>
public class KafkaNoTransactionSender<K,V> extends Object implements KafkaProduceSender<K,V>
This sender will send the data to the Kafka, and will not guarantee the data is committed to the Kafka exactly-once.
-
-
构造器概要
构造器 构造器 说明 KafkaNoTransactionSender(Properties properties)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 voidabortTransaction()Abort the current transaction.voidabortTransaction(long checkpointId)Abort the given transaction.voidbeginTransaction(String transactionId)voidclose()Optional<KafkaCommitInfo>prepareCommit()Prepare a transaction commit.voidsend(org.apache.kafka.clients.producer.ProducerRecord<K,V> producerRecord)Send data to kafka.List<KafkaSinkState>snapshotState(long checkpointId)Get the current kafka state of the sender.
-
-
-
构造器详细资料
-
KafkaNoTransactionSender
public KafkaNoTransactionSender(Properties properties)
-
-
方法详细资料
-
send
public void send(org.apache.kafka.clients.producer.ProducerRecord<K,V> producerRecord)
从接口复制的说明:KafkaProduceSenderSend data to kafka.- 指定者:
send在接口中KafkaProduceSender<K,V>- 参数:
producerRecord- data to send
-
beginTransaction
public void beginTransaction(String transactionId)
- 指定者:
beginTransaction在接口中KafkaProduceSender<K,V>
-
prepareCommit
public Optional<KafkaCommitInfo> prepareCommit()
从接口复制的说明:KafkaProduceSenderPrepare a transaction commit.- 指定者:
prepareCommit在接口中KafkaProduceSender<K,V>- 返回:
- commit info, or empty if no commit is needed.
-
abortTransaction
public void abortTransaction()
从接口复制的说明:KafkaProduceSenderAbort the current transaction.- 指定者:
abortTransaction在接口中KafkaProduceSender<K,V>
-
abortTransaction
public void abortTransaction(long checkpointId)
从接口复制的说明:KafkaProduceSenderAbort the given transaction.- 指定者:
abortTransaction在接口中KafkaProduceSender<K,V>- 参数:
checkpointId- the id of the last checkpoint of the last run
-
snapshotState
public List<KafkaSinkState> snapshotState(long checkpointId)
从接口复制的说明:KafkaProduceSenderGet the current kafka state of the sender.- 指定者:
snapshotState在接口中KafkaProduceSender<K,V>- 返回:
- kafka state List, or empty if no state is available.
-
close
public void close()
- 指定者:
close在接口中AutoCloseable
-
-