Mercurial > hg > Database > Alice
annotate src/main/java/alice/test/topology/localTestTopology/LocalTestTopology.java @ 644:e0621f645e2e
add local topology test
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 31 Dec 2017 09:59:59 +0900 |
parents | 74dbb8809c73 |
children | cb16036404ba |
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; | |
7 | |
8 import java.util.LinkedList; | |
9 | |
10 public class LocalTestTopology { | |
11 | |
12 public static void main(String[] args) { | |
13 LinkedList<LocalTestTopologyConfig> configs = new LinkedList<LocalTestTopologyConfig>(); | |
14 int port = 10000; | |
644
e0621f645e2e
add local topology test
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
643
diff
changeset
|
15 int toplogyManagerPort = port++; |
643 | 16 configs.add(new LocalTestTopologyConfig(args, port++, "remote1")); |
17 configs.add(new LocalTestTopologyConfig(args, port++, "remote2")); | |
18 configs.add(new LocalTestTopologyConfig(args, port++, "remote3")); | |
19 | |
644
e0621f645e2e
add local topology test
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
643
diff
changeset
|
20 TopologyManagerConfig topologyManagerConfig = new TopologyManagerConfig(args); |
e0621f645e2e
add local topology test
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
643
diff
changeset
|
21 new AliceDaemon(topologyManagerConfig).listen(); |
e0621f645e2e
add local topology test
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
643
diff
changeset
|
22 new StartTopologyManager(topologyManagerConfig).execute(); |
643 | 23 |
24 for (LocalTestTopologyConfig conf: configs ) { | |
25 new AliceDaemon(conf).listen(); | |
644
e0621f645e2e
add local topology test
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
643
diff
changeset
|
26 DataSegment.connect(conf.key, "rev" + conf.key, conf.hostname, toplogyManagerPort); |
643 | 27 } |
28 new LTopologyStartCodeSegment(configs).execute(); | |
29 } | |
30 | |
31 } |