Naireen commented on code in PR #33408:
URL: https://github.com/apache/beam/pull/33408#discussion_r1909344437
##########
sdks/java/io/kafka/src/main/java/org/apache/beam/sdk/io/kafka/KafkaUnboundedReader.java:
##########
@@ -302,13 +303,11 @@ public Instant getCurrentTimestamp() throws
NoSuchElementException {
@Override
public long getSplitBacklogBytes() {
long backlogBytes = 0;
-
for (PartitionState<K, V> p : partitionStates) {
long pBacklog = p.approxBacklogInBytes();
if (pBacklog == UnboundedReader.BACKLOG_UNKNOWN) {
return UnboundedReader.BACKLOG_UNKNOWN;
}
- backlogBytes += pBacklog;
}
return backlogBytes;
Review Comment:
yes I agree, this was deleted accidentally. Reverted that.
##########
sdks/java/io/kafka/src/main/java/org/apache/beam/sdk/io/kafka/KafkaUnboundedReader.java:
##########
@@ -743,6 +747,16 @@ private void reportBacklog() {
backlogElementsOfSplit.set(splitBacklogMessages);
}
+ private void reportBacklogMetrics() {
Review Comment:
No, I explicitly moved it out to be separate, since reportBacklog() is
called twice, and we only need to do this once (when we advance to the next
record).
--
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]