comparison src/main/java/alice/test/topology/localTestTopology/LocalTestTopology.java @ 646:3c060de44c2e

debug toplogy test
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sun, 31 Dec 2017 12:06:45 +0900
parents cb16036404ba
children e321c5ec9b58
comparison
equal deleted inserted replaced
645:cb16036404ba 646:3c060de44c2e
1 package alice.test.topology.localTestTopology; 1 package alice.test.topology.localTestTopology;
2 2
3 import alice.codesegment.CodeSegment;
3 import alice.daemon.AliceDaemon; 4 import alice.daemon.AliceDaemon;
4 import alice.datasegment.DataSegment; 5 import alice.datasegment.*;
5 import alice.topology.manager.StartTopologyManager; 6 import alice.topology.manager.StartTopologyManager;
6 import alice.topology.manager.TopologyManagerConfig; 7 import alice.topology.manager.TopologyManagerConfig;
7 import alice.topology.node.StartTopologyNode; 8 import alice.topology.node.StartTopologyNode;
8 import alice.topology.node.TopologyNodeConfig; 9 import alice.topology.node.TopologyNodeConfig;
9 10
22 TopologyManagerConfig topologyManagerConfig = new TopologyManagerConfig(args); 23 TopologyManagerConfig topologyManagerConfig = new TopologyManagerConfig(args);
23 new AliceDaemon(topologyManagerConfig).listen(); 24 new AliceDaemon(topologyManagerConfig).listen();
24 new StartTopologyManager(topologyManagerConfig).execute(); 25 new StartTopologyManager(topologyManagerConfig).execute();
25 26
26 for (LocalTestTopologyConfig conf: configs ) { 27 for (LocalTestTopologyConfig conf: configs ) {
27 String[] csarg = {"--port ", Integer.toString(topologyManagerConfig.localPort), "--host","localhost" }; 28 new AliceDaemon(conf).listen();
29 DataSegment.connect(conf.key,conf.key,"localhost",conf.localPort);
30 String[] csarg = {"-port ", Integer.toString(topologyManagerConfig.localPort), "-host","localhost","-localKey",conf.key };
28 TopologyNodeConfig cs = new TopologyNodeConfig(csarg); 31 TopologyNodeConfig cs = new TopologyNodeConfig(csarg);
29 cs.setLocalKey(conf.key); 32 cs.setLocalKey(conf.key);
30 cs.setManagerKey("manager"); 33 cs.setManagerKey("manager");
31 new StartTopologyNode(cs, new LTRemoteIncrement(conf)); 34 new StartTopologyNode(cs, new LTRemoteIncrement(conf)).execute();
32 } 35 }
33 new LTopologyStartCodeSegment(configs).execute(); 36 new LTopologyStartCodeSegment(configs).execute();
34 } 37 }
35 38
36 } 39 }