org.apache.kafka.clients.producer.internals.TransactionalRequestResult#await ( )源码实例Demo

下面列出了org.apache.kafka.clients.producer.internals.TransactionalRequestResult#await ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

/**
 * Besides committing {@link org.apache.kafka.clients.producer.KafkaProducer#commitTransaction} is also adding new
 * partitions to the transaction. flushNewPartitions method is moving this logic to pre-commit/flush, to make
 * resumeTransaction simpler. Otherwise resumeTransaction would require to restore state of the not yet added/"in-flight"
 * partitions.
 */
private void flushNewPartitions() {
	LOG.info("Flushing new partitions");
	TransactionalRequestResult result = enqueueNewPartitions();
	Object sender = getValue(kafkaProducer, "sender");
	invoke(sender, "wakeup");
	result.await();
}
 
源代码2 项目: Flink-CEPplus   文件: FlinkKafkaProducer.java
/**
 * Besides committing {@link org.apache.kafka.clients.producer.KafkaProducer#commitTransaction} is also adding new
 * partitions to the transaction. flushNewPartitions method is moving this logic to pre-commit/flush, to make
 * resumeTransaction simpler. Otherwise resumeTransaction would require to restore state of the not yet added/"in-flight"
 * partitions.
 */
private void flushNewPartitions() {
	LOG.info("Flushing new partitions");
	TransactionalRequestResult result = enqueueNewPartitions();
	Object sender = getValue(kafkaProducer, "sender");
	invoke(sender, "wakeup");
	result.await();
}
 
源代码3 项目: flink   文件: FlinkKafkaInternalProducer.java
/**
 * Besides committing {@link org.apache.kafka.clients.producer.KafkaProducer#commitTransaction} is also adding new
 * partitions to the transaction. flushNewPartitions method is moving this logic to pre-commit/flush, to make
 * resumeTransaction simpler. Otherwise resumeTransaction would require to restore state of the not yet added/"in-flight"
 * partitions.
 */
private void flushNewPartitions() {
	LOG.info("Flushing new partitions");
	TransactionalRequestResult result = enqueueNewPartitions();
	Object sender = getValue(kafkaProducer, "sender");
	invoke(sender, "wakeup");
	result.await();
}
 
源代码4 项目: flink   文件: FlinkKafkaProducer.java
/**
 * Besides committing {@link org.apache.kafka.clients.producer.KafkaProducer#commitTransaction} is also adding new
 * partitions to the transaction. flushNewPartitions method is moving this logic to pre-commit/flush, to make
 * resumeTransaction simpler. Otherwise resumeTransaction would require to restore state of the not yet added/"in-flight"
 * partitions.
 */
private void flushNewPartitions() {
	LOG.info("Flushing new partitions");
	TransactionalRequestResult result = enqueueNewPartitions();
	Object sender = getValue(kafkaProducer, "sender");
	invoke(sender, "wakeup");
	result.await();
}
 
源代码5 项目: flink   文件: FlinkKafkaInternalProducer.java
/**
 * Besides committing {@link org.apache.kafka.clients.producer.KafkaProducer#commitTransaction} is also adding new
 * partitions to the transaction. flushNewPartitions method is moving this logic to pre-commit/flush, to make
 * resumeTransaction simpler. Otherwise resumeTransaction would require to restore state of the not yet added/"in-flight"
 * partitions.
 */
private void flushNewPartitions() {
	LOG.info("Flushing new partitions");
	TransactionalRequestResult result = enqueueNewPartitions();
	Object sender = getField(kafkaProducer, "sender");
	invoke(sender, "wakeup");
	result.await();
}
 
源代码6 项目: flink   文件: FlinkKafkaProducer.java
/**
 * Besides committing {@link org.apache.kafka.clients.producer.KafkaProducer#commitTransaction} is also adding new
 * partitions to the transaction. flushNewPartitions method is moving this logic to pre-commit/flush, to make
 * resumeTransaction simpler. Otherwise resumeTransaction would require to restore state of the not yet added/"in-flight"
 * partitions.
 */
private void flushNewPartitions() {
	LOG.info("Flushing new partitions");
	TransactionalRequestResult result = enqueueNewPartitions();
	Object sender = getValue(kafkaProducer, "sender");
	invoke(sender, "wakeup");
	result.await();
}