Naireen commented on code in PR #34275:
URL: https://github.com/apache/beam/pull/34275#discussion_r2006323092


##########
sdks/java/io/kafka/src/main/java/org/apache/beam/sdk/io/kafka/ReadFromKafkaDoFn.java:
##########
@@ -583,13 +586,15 @@ private boolean topicPartitionExists(
 
   // see https://github.com/apache/beam/issues/25962
   private ConsumerRecords<byte[], byte[]> poll(
-      Consumer<byte[], byte[]> consumer, TopicPartition topicPartition) {
+      Consumer<byte[], byte[]> consumer, TopicPartition topicPartition, 
KafkaMetrics kafkaMetrics) {
     final Stopwatch sw = Stopwatch.createStarted();
     long previousPosition = -1;
-    java.time.Duration elapsed = java.time.Duration.ZERO;
     java.time.Duration timeout = 
java.time.Duration.ofSeconds(this.consumerPollingTimeout);
     while (true) {
+      java.time.Duration elapsed = sw.elapsed();

Review Comment:
   Done.



-- 
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: github-unsubscr...@beam.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to