apex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From david...@apache.org
Subject [1/2] incubator-apex-core git commit: APEX-22 #resolve #comment adding the port object only when it doesn't already exist
Date Thu, 10 Sep 2015 00:06:54 GMT
Repository: incubator-apex-core
Updated Branches:
  refs/heads/devel-3 8eb81f7c6 -> 065ddbef4


APEX-22 #resolve #comment adding the port object only when it doesn't already exist


Project: http://git-wip-us.apache.org/repos/asf/incubator-apex-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-apex-core/commit/39d5d31e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-apex-core/tree/39d5d31e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-apex-core/diff/39d5d31e

Branch: refs/heads/devel-3
Commit: 39d5d31e50c9e4fda863d0b0f620fc02f6f8382d
Parents: 09f716e
Author: Chandni Singh <csingh@apache.org>
Authored: Wed Sep 9 16:37:32 2015 -0700
Committer: Chandni Singh <csingh@apache.org>
Committed: Wed Sep 9 16:46:36 2015 -0700

----------------------------------------------------------------------
 .../java/com/datatorrent/stram/plan/logical/Operators.java   | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-apex-core/blob/39d5d31e/engine/src/main/java/com/datatorrent/stram/plan/logical/Operators.java
----------------------------------------------------------------------
diff --git a/engine/src/main/java/com/datatorrent/stram/plan/logical/Operators.java b/engine/src/main/java/com/datatorrent/stram/plan/logical/Operators.java
index 9e08cba..57742a7 100644
--- a/engine/src/main/java/com/datatorrent/stram/plan/logical/Operators.java
+++ b/engine/src/main/java/com/datatorrent/stram/plan/logical/Operators.java
@@ -63,13 +63,17 @@ public abstract class Operators
     @Override
     public void addInputPort(Operator.InputPort<?> port, Field field, InputPortFieldAnnotation
portAnnotation, AppData.QueryPort adqAnnotation)
     {
-      inputPorts.put(field.getName(), new PortContextPair<InputPort<?>>(port));
+      if (!inputPorts.containsKey(field.getName())) {
+        inputPorts.put(field.getName(), new PortContextPair<InputPort<?>>(port));
+      }
     }
 
     @Override
     public void addOutputPort(Operator.OutputPort<?> port, Field field, OutputPortFieldAnnotation
portAnnotation, AppData.ResultPort adrAnnotation)
     {
-      outputPorts.put(field.getName(), new PortContextPair<OutputPort<?>>(port));
+      if (!outputPorts.containsKey(field.getName())) {
+        outputPorts.put(field.getName(), new PortContextPair<OutputPort<?>>(port));
+      }
     }
   };
 


Mime
View raw message