Mercurial > hg > Database > Christie
changeset 86:07cbaa54db43
fix treeTestTopology
author | akahori |
---|---|
date | Sat, 15 Sep 2018 10:28:55 +0900 |
parents | 331ad549e764 |
children | 33afa0fa8bc5 |
files | src/main/java/christie/test/topology/treeTestTopology/ChildCodeGear.java src/main/java/christie/test/topology/treeTestTopology/StartTreeTestTopology.java |
diffstat | 2 files changed, 3 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/christie/test/topology/treeTestTopology/ChildCodeGear.java Sat Sep 15 10:22:12 2018 +0900 +++ b/src/main/java/christie/test/topology/treeTestTopology/ChildCodeGear.java Sat Sep 15 10:28:55 2018 +0900 @@ -1,7 +1,6 @@ package christie.test.topology.treeTestTopology; import christie.annotation.Peek; -import christie.annotation.Take; import christie.codegear.CodeGear; import christie.codegear.CodeGearManager; @@ -11,8 +10,8 @@ @Override protected void run(CodeGearManager cgm) { - - getDGM("parent").put("childNodeName", nodeName); + if(cgm.getDgmList().containsKey("parent")) + getDGM("parent").put("childNodeName", nodeName); cgm.setup(new ParentCodeGear()); } }
--- a/src/main/java/christie/test/topology/treeTestTopology/StartTreeTestTopology.java Sat Sep 15 10:22:12 2018 +0900 +++ b/src/main/java/christie/test/topology/treeTestTopology/StartTreeTestTopology.java Sat Sep 15 10:28:55 2018 +0900 @@ -7,8 +7,6 @@ import christie.topology.node.StartTopologyNode; import christie.topology.node.TopologyNodeConfig; -import java.util.LinkedList; - public class StartTreeTestTopology extends StartCodeGear { @@ -31,9 +29,7 @@ "--managerPort", String.valueOf(topologyManagerConfig.localPort), "--managerHost", "localhost"}; TopologyNodeConfig cs = new TopologyNodeConfig(nodeArg); - - new StartTopologyNode(nodeCGM, cs, new ParentCodeGear()); - + new StartTopologyNode(nodeCGM, cs, new ChildCodeGear()); } }