ramitg254 commented on code in PR #6110:
URL: https://github.com/apache/hive/pull/6110#discussion_r2519279058
##########
kafka-handler/src/java/org/apache/hadoop/hive/kafka/HiveKafkaProducer.java:
##########
@@ -181,10 +188,15 @@ short getEpoch() {
*/
private void flushNewPartitions() {
LOG.info("Flushing new partitions");
- TransactionalRequestResult result = enqueueNewPartitions();
- Object sender = getValue(kafkaProducer, "sender");
- invoke(sender, "wakeup");
- result.await();
+ Object transactionManager = getValue(kafkaProducer, "transactionManager");
+ Set<TopicPartition> newPartitionsInTransaction =
+ (Set<TopicPartition>) getValue(transactionManager,
"newPartitionsInTransaction");
+ if (!newPartitionsInTransaction.isEmpty()) {
Review Comment:
done, Thanks for bringing this up, kept the implementation similar to the
one mentioned, just avoided some unnecessary methods for getting field value
for a particular single variable which is not required
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]