beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From k...@apache.org
Subject [2/6] incubator-beam git commit: Fix condition on state/splittable ParDo validation
Date Thu, 20 Oct 2016 01:02:11 GMT
Fix condition on state/splittable ParDo validation


Project: http://git-wip-us.apache.org/repos/asf/incubator-beam/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-beam/commit/08fdb304
Tree: http://git-wip-us.apache.org/repos/asf/incubator-beam/tree/08fdb304
Diff: http://git-wip-us.apache.org/repos/asf/incubator-beam/diff/08fdb304

Branch: refs/heads/master
Commit: 08fdb304a777d981fa3860fcd0270aa40f99da75
Parents: 507cba8
Author: Kenneth Knowles <klk@google.com>
Authored: Fri Oct 14 14:19:59 2016 -0700
Committer: Kenneth Knowles <klk@google.com>
Committed: Tue Oct 18 13:09:04 2016 -0700

----------------------------------------------------------------------
 .../core/src/main/java/org/apache/beam/sdk/transforms/ParDo.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/08fdb304/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/ParDo.java
----------------------------------------------------------------------
diff --git a/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/ParDo.java b/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/ParDo.java
index 4d34c88..776f768 100644
--- a/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/ParDo.java
+++ b/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/ParDo.java
@@ -564,7 +564,7 @@ public class ParDo {
     }
 
     // State is semantically incompatible with splitting
-    if (!signature.stateDeclarations().isEmpty()) {
+    if (!signature.stateDeclarations().isEmpty() && signature.processElement().isSplittable())
{
       throw new UnsupportedOperationException(
           String.format("%s is splittable and uses state, but these are not compatible",
               fn.getClass().getName()));


Mime
View raw message