Java Code Examples for org.apache.kafka.clients.producer.internals.TransactionalRequestResult#await()
The following examples show how to use
org.apache.kafka.clients.producer.internals.TransactionalRequestResult#await() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: FlinkKafkaInternalProducer.java From Flink-CEPplus with Apache License 2.0 | 5 votes |
/** * 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(); }
Example 2
Source File: FlinkKafkaProducer.java From Flink-CEPplus with Apache License 2.0 | 5 votes |
/** * 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(); }
Example 3
Source File: FlinkKafkaInternalProducer.java From flink with Apache License 2.0 | 5 votes |
/** * 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(); }
Example 4
Source File: FlinkKafkaProducer.java From flink with Apache License 2.0 | 5 votes |
/** * 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(); }
Example 5
Source File: FlinkKafkaInternalProducer.java From flink with Apache License 2.0 | 5 votes |
/** * 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(); }
Example 6
Source File: FlinkKafkaProducer.java From flink with Apache License 2.0 | 5 votes |
/** * 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(); }