Mercurial > hg > Database > Alice
view 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 |
line wrap: on
line source
package alice.test.topology.localTestTopology; import alice.codesegment.CodeSegment; import alice.daemon.AliceDaemon; import alice.datasegment.*; import alice.topology.manager.StartTopologyManager; import alice.topology.manager.TopologyManagerConfig; import alice.topology.node.StartTopologyNode; import alice.topology.node.TopologyNodeConfig; import java.util.LinkedList; public class LocalTestTopology { public static void main(String[] args) { LinkedList<LocalTestTopologyConfig> configs = new LinkedList<LocalTestTopologyConfig>(); int port = 10001; configs.add(new LocalTestTopologyConfig(args, port++, "remote1")); configs.add(new LocalTestTopologyConfig(args, port++, "remote2")); configs.add(new LocalTestTopologyConfig(args, port++, "remote3")); TopologyManagerConfig topologyManagerConfig = new TopologyManagerConfig(args); new AliceDaemon(topologyManagerConfig).listen(); new StartTopologyManager(topologyManagerConfig).execute(); for (LocalTestTopologyConfig conf: configs ) { new AliceDaemon(conf).listen(); DataSegment.connect(conf.key,conf.key,"localhost",conf.localPort); String[] csarg = {"-port ", Integer.toString(topologyManagerConfig.localPort), "-host","localhost","-localKey",conf.key }; TopologyNodeConfig cs = new TopologyNodeConfig(csarg); cs.setLocalKey(conf.key); cs.setManagerKey("manager"); new StartTopologyNode(cs, new LTRemoteIncrement(conf)).execute(); } new LTopologyStartCodeSegment(configs).execute(); } }