acrites commented on code in PR #37691:
URL: https://github.com/apache/beam/pull/37691#discussion_r2881136994


##########
sdks/java/harness/src/main/java/org/apache/beam/fn/harness/PTransformRunnerFactory.java:
##########
@@ -160,6 +160,18 @@ <T> void addIncomingTimerEndpoint(
      * instant provides the timeout on how long the finalization callback is 
valid for.
      */
     DoFn.BundleFinalizer getBundleFinalizer();
+
+    /**
+     * Returns true if the runner has no state for the keys in the 
ProcessBundleRequest. If true,
+     * the SDK can begin stateful processing with an initial empty state.
+     */
+    boolean getHasNoState();

Review Comment:
   In all of this plumbing, I'm wondering if these should be 
`Supplier<boolean>`'s instead of booleans. We reuse a bunch of these objects 
across many different bundles and, in theory, different bundles could have 
different values for `hasNoState` and `onlyBundleForKeys` (though I think for 
batch it'll just always be true).



-- 
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]

Reply via email to