arunpandianp commented on code in PR #38767:
URL: https://github.com/apache/beam/pull/38767#discussion_r3361833601
##########
runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/streaming/Work.java:
##########
@@ -416,4 +431,57 @@ private Optional<KeyedGetDataResponse>
fetchKeyedState(KeyedGetDataRequest reque
return Optional.ofNullable(getDataClient().getStateData(computationId(),
request));
}
}
+
+ /**
+ * WorkItems with same key group and computation are eligible to be executed
together in a
+ * multi-key bundle.
+ */
+ public static final class KeyGroup {
+
+ // The default 0 key group. Work items with 0 keyGroup will always be
executed
+ // separately and not in a multi-key bundle
+ public static final KeyGroup DEFAULT = new KeyGroup(0, 0);
+
+ private final long high;
+ private final long low;
+
+ private KeyGroup(long high, long low) {
+ this.high = high;
+ this.low = low;
+ }
+
+ public static KeyGroup create(long high, long low) {
+ return new KeyGroup(high, low);
Review Comment:
Windmill can choose to send a 0 key group to disable batching, so
create(0,0) is valid and can happen.
--
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]