shunping commented on code in PR #39487:
URL: https://github.com/apache/beam/pull/39487#discussion_r3677573581
##########
runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/DataflowOutputCounter.java:
##########
@@ -63,15 +84,17 @@ public void update(Object elem) throws Exception {
objectAndByteCounter.update(elem);
long windowsSize = ((WindowedValue<?>) elem).getWindows().size();
if (windowsSize == 0) {
- // GroupingShuffleReader produces ValueInEmptyWindows.
- // For now, we count the element at least once to keep the current
counter
- // behavior.
- elementCount.addValue(1L);
+ updateEmptyWindows(elem);
} else {
+ // Standard WindowedValue.
elementCount.addValue(windowsSize);
}
}
+ protected void updateEmptyWindows(Object elem) throws Exception {
Review Comment:
Done.
##########
runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/WindmillKeyedWorkItem.java:
##########
@@ -184,6 +184,56 @@ public Iterable<TimerData> timersIterable() {
}
}
+ @SuppressWarnings("nullness")
+ private @Nullable WindowedValue<ElemT> parseElemWindowOnly(Windmill.Message
message) {
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]