Mercurial > hg > Database > Alice
annotate src/alice/topology/node/StartTopologyNode.java @ 173:23d6a775a643 working
fix getResource fail
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 14 Jan 2013 19:21:13 +0900 |
parents | 7982324d4329 |
children | d7816b9b72e9 |
rev | line source |
---|---|
25 | 1 package alice.topology.node; |
2 | |
3 import java.net.InetAddress; | |
4 import java.net.UnknownHostException; | |
5 | |
6 import alice.codesegment.CodeSegment; | |
7 import alice.datasegment.DataSegment; | |
8 import alice.topology.HostMessage; | |
9 | |
10 public class StartTopologyNode extends CodeSegment { | |
11 | |
26 | 12 private TopologyNodeConfig conf; |
46 | 13 private CodeSegment startCS; |
25 | 14 |
46 | 15 public StartTopologyNode(TopologyNodeConfig conf, CodeSegment startCS) { |
25 | 16 this.conf = conf; |
46 | 17 this.startCS = startCS; |
25 | 18 } |
19 | |
20 @Override | |
21 public void run() { | |
34
ca079a730d0b
added method to OutputDataSegment and Receiver, to convert type from Value to Class<?> without MessagePack
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
30
diff
changeset
|
22 DataSegment.connect("manager", "", conf.managerHostName, conf.managerPort); |
ca079a730d0b
added method to OutputDataSegment and Receiver, to convert type from Value to Class<?> without MessagePack
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
30
diff
changeset
|
23 String localHostName = null; |
173 | 24 // nocalHostName = InetAddress.getLocalHost().getHostName(); |
25 localHostName = "192.168.128.41"; | |
95 | 26 HostMessage host = new HostMessage(localHostName, conf.localPort); |
34
ca079a730d0b
added method to OutputDataSegment and Receiver, to convert type from Value to Class<?> without MessagePack
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
30
diff
changeset
|
27 ods.put("manager", "host", host); |
25 | 28 |
95 | 29 new IncomingAbstractHostName(); |
28
98ab26e09a98
Configuration Manager work and implements reverseKey
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
27
diff
changeset
|
30 |
98ab26e09a98
Configuration Manager work and implements reverseKey
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
27
diff
changeset
|
31 IncomingReverseKey cs2 = new IncomingReverseKey(); |
98ab26e09a98
Configuration Manager work and implements reverseKey
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
27
diff
changeset
|
32 cs2.reverseKey.setKey("local", "reverseKey"); |
98ab26e09a98
Configuration Manager work and implements reverseKey
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
27
diff
changeset
|
33 cs2.reverseCount.setKey("local", "reverseCount"); |
98ab26e09a98
Configuration Manager work and implements reverseKey
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
27
diff
changeset
|
34 |
34
ca079a730d0b
added method to OutputDataSegment and Receiver, to convert type from Value to Class<?> without MessagePack
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
30
diff
changeset
|
35 ods.put("local", "reverseCount", 0); |
28
98ab26e09a98
Configuration Manager work and implements reverseKey
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
27
diff
changeset
|
36 |
46 | 37 ConfigurationFinish cs3 = new ConfigurationFinish(startCS); |
28
98ab26e09a98
Configuration Manager work and implements reverseKey
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
27
diff
changeset
|
38 cs3.reverseCount.setKey("local", "reverseCount"); |
98ab26e09a98
Configuration Manager work and implements reverseKey
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
27
diff
changeset
|
39 cs3.configNodeNum.setKey("local", "configNodeNum"); |
25 | 40 } |
41 | |
42 } |