You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2020/04/01 21:33:46 UTC

[GitHub] [beam] robertwb commented on a change in pull request #11266: [BEAM-9636] Using TimerFamily should also be considered as stateful.

robertwb commented on a change in pull request #11266: [BEAM-9636] Using TimerFamily should also be considered as stateful.
URL: https://github.com/apache/beam/pull/11266#discussion_r401922952
 
 

 ##########
 File path: runners/core-construction-java/src/main/java/org/apache/beam/runners/core/construction/SplittableParDo.java
 ##########
 @@ -416,8 +417,13 @@ public FunctionSpec translateDoFn(SdkComponents newComponents) {
 
                 @Override
                 public boolean isStateful() {
-                  return !signature.stateDeclarations().isEmpty()
-                      || !signature.timerDeclarations().isEmpty();
+                  // SDFs should not have user timer/state.
+                  checkState(
+                      signature.stateDeclarations().isEmpty()
+                          && signature.timerDeclarations().isEmpty()
+                          && signature.timerFamilyDeclarations().isEmpty(),
+                      "SDFs should not have user state/timer.");
 
 Review comment:
   This does not seem the right place to prohibit this--we should just pass through what is present. (It is true that some runners may not support it (yet?).)

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services