scwhittle commented on code in PR #30048:
URL: https://github.com/apache/beam/pull/30048#discussion_r1458915472
##########
runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/streaming/ActiveWorkState.java:
##########
@@ -238,6 +239,23 @@ private static Stream<KeyedGetDataRequest>
toKeyedGetDataRequestStream(
.build());
}
+ /**
+ * Returns the current aggregate {@link GetWorkBudget} that is active on the
user worker. Active
+ * means that the work is received from Windmill, being processed or queued
to be processed in
+ * {@link ActiveWorkState}, and not committed back to Windmill.
+ */
+ synchronized GetWorkBudget currentActiveWorkBudget() {
Review Comment:
depending on how often this is called, it might be better to keep a running
total as we add/remove things instead of calculating by iterating over
everything each time this is called.
##########
runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/streaming/ComputationState.java:
##########
@@ -126,6 +127,13 @@ public ImmutableList<KeyedGetDataRequest> getKeysToRefresh(
return activeWorkState.getKeysToRefresh(refreshDeadline, sampler);
}
+ @SuppressWarnings(
Review Comment:
add test to avoid this? or just remove this part for now and add when it
actually is used.
--
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]