beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From k...@apache.org
Subject [23/36] beam git commit: mr-runner: fix NPE in PipelineTest.testIdentityTransform().
Date Thu, 07 Sep 2017 18:39:32 GMT
mr-runner: fix NPE in PipelineTest.testIdentityTransform().


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

Branch: refs/heads/mr-runner
Commit: 807f903413bec1d8052406adeac2ddd793765511
Parents: d71975e
Author: Pei He <pei@apache.org>
Authored: Wed Aug 30 20:01:06 2017 +0800
Committer: Pei He <pei@apache.org>
Committed: Fri Sep 1 17:13:40 2017 +0800

----------------------------------------------------------------------
 .../apache/beam/runners/mapreduce/translation/GraphConverter.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/beam/blob/807f9034/runners/map-reduce/src/main/java/org/apache/beam/runners/mapreduce/translation/GraphConverter.java
----------------------------------------------------------------------
diff --git a/runners/map-reduce/src/main/java/org/apache/beam/runners/mapreduce/translation/GraphConverter.java
b/runners/map-reduce/src/main/java/org/apache/beam/runners/mapreduce/translation/GraphConverter.java
index de1c80b..458961f 100644
--- a/runners/map-reduce/src/main/java/org/apache/beam/runners/mapreduce/translation/GraphConverter.java
+++ b/runners/map-reduce/src/main/java/org/apache/beam/runners/mapreduce/translation/GraphConverter.java
@@ -70,7 +70,8 @@ public class GraphConverter extends Pipeline.PipelineVisitor.Defaults {
   @Override
   public void leaveCompositeTransform(TransformHierarchy.Node node) {
     if (node.getTransform() != null) {
-      if (enclosedTransformCounts.get(node) > 1) {
+      Integer enclosedTransformCount = enclosedTransformCounts.get(node);
+      if (enclosedTransformCount != null && enclosedTransformCount > 1) {
         dotfileNodesBuilders.peek().insert(0, new StringBuilder()
             .append(getIndent()).append(
                 String.format("subgraph \"cluster_%s\" {", node.getFullName()))


Mime
View raw message