Mercurial > hg > Database > Alice
annotate src/main/java/alice/test/topology/localTestTopology/LocalTestTopology.java @ 645:cb16036404ba
fix local topology test
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 31 Dec 2017 11:04:29 +0900 (2017-12-31) |
parents | e0621f645e2e |
children | 3c060de44c2e |
rev | line source |
---|---|
643 | 1 package alice.test.topology.localTestTopology; |
2 | |
3 import alice.daemon.AliceDaemon; | |
4 import alice.datasegment.DataSegment; | |
5 import alice.topology.manager.StartTopologyManager; | |
6 import alice.topology.manager.TopologyManagerConfig; | |
645
cb16036404ba
fix local topology test
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
644
diff
changeset
|
7 import alice.topology.node.StartTopologyNode; |
cb16036404ba
fix local topology test
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
644
diff
changeset
|
8 import alice.topology.node.TopologyNodeConfig; |
643 | 9 |
10 import java.util.LinkedList; | |
11 | |
12 public class LocalTestTopology { | |
13 | |
645
cb16036404ba
fix local topology test
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
644
diff
changeset
|
14 |
643 | 15 public static void main(String[] args) { |
16 LinkedList<LocalTestTopologyConfig> configs = new LinkedList<LocalTestTopologyConfig>(); | |
645
cb16036404ba
fix local topology test
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
644
diff
changeset
|
17 int port = 10001; |
643 | 18 configs.add(new LocalTestTopologyConfig(args, port++, "remote1")); |
19 configs.add(new LocalTestTopologyConfig(args, port++, "remote2")); | |
20 configs.add(new LocalTestTopologyConfig(args, port++, "remote3")); | |
21 | |
644
e0621f645e2e
add local topology test
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
643
diff
changeset
|
22 TopologyManagerConfig topologyManagerConfig = new TopologyManagerConfig(args); |
e0621f645e2e
add local topology test
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
643
diff
changeset
|
23 new AliceDaemon(topologyManagerConfig).listen(); |
e0621f645e2e
add local topology test
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
643
diff
changeset
|
24 new StartTopologyManager(topologyManagerConfig).execute(); |
643 | 25 |
26 for (LocalTestTopologyConfig conf: configs ) { | |
645
cb16036404ba
fix local topology test
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
644
diff
changeset
|
27 String[] csarg = {"--port ", Integer.toString(topologyManagerConfig.localPort), "--host","localhost" }; |
cb16036404ba
fix local topology test
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
644
diff
changeset
|
28 TopologyNodeConfig cs = new TopologyNodeConfig(csarg); |
cb16036404ba
fix local topology test
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
644
diff
changeset
|
29 cs.setLocalKey(conf.key); |
cb16036404ba
fix local topology test
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
644
diff
changeset
|
30 cs.setManagerKey("manager"); |
cb16036404ba
fix local topology test
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
644
diff
changeset
|
31 new StartTopologyNode(cs, new LTRemoteIncrement(conf)); |
643 | 32 } |
33 new LTopologyStartCodeSegment(configs).execute(); | |
34 } | |
35 | |
36 } |