# HG changeset patch
# User tatsuki
# Date 1404552520 -32400
# Node ID 69b5565c4a631e9a151d1b4692966f68ddc50002
# Parent bd6dbbd834455c3624bdd60cceca01780935ac82
no use toporogy
diff -r bd6dbbd83445 -r 69b5565c4a63 .classpath
--- a/.classpath Sat Jul 05 16:14:47 2014 +0900
+++ b/.classpath Sat Jul 05 18:28:40 2014 +0900
@@ -6,6 +6,7 @@
+
@@ -61,6 +62,10 @@
-
+
+
+
+
+
diff -r bd6dbbd83445 -r 69b5565c4a63 .project
--- a/.project Sat Jul 05 16:14:47 2014 +0900
+++ b/.project Sat Jul 05 18:28:40 2014 +0900
@@ -1,21 +1,32 @@
- jungle-network
- NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse.
-
- jungle-core
- bulletinboard
-
-
-
- org.eclipse.jdt.core.javabuilder
-
-
- org.eclipse.m2e.core.maven2Builder
-
-
-
- org.eclipse.m2e.core.maven2Nature
- org.eclipse.jdt.core.javanature
-
-
\ No newline at end of file
+ jungle-network
+ NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse.
+
+ jungle-core
+ bulletinboard
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+ org.eclipse.m2e.core.maven2Builder
+
+
+
+
+
+ org.eclipse.m2e.core.maven2Nature
+ org.eclipse.jdt.core.javanature
+
+
+
+ Alice
+ 2
+ /Users/one/hg/Database/Alice
+
+
+
diff -r bd6dbbd83445 -r 69b5565c4a63 pom.xml
--- a/pom.xml Sat Jul 05 16:14:47 2014 +0900
+++ b/pom.xml Sat Jul 05 18:28:40 2014 +0900
@@ -11,8 +11,8 @@
maven-compiler-plugin
3.0
-
- 1.6
+
+ 1.8
@@ -30,7 +30,7 @@
org.mortbay.jetty
jetty
- 9.2.1
+ 6.1.26
org.hectorclient
@@ -49,11 +49,6 @@
- alice
- alice
- 0.2
-
-
org.msgpack
msgpack
0.6.8
diff -r bd6dbbd83445 -r 69b5565c4a63 src/main/java/app/bbs/DistributeApp.java
--- a/src/main/java/app/bbs/DistributeApp.java Sat Jul 05 16:14:47 2014 +0900
+++ b/src/main/java/app/bbs/DistributeApp.java Sat Jul 05 18:28:40 2014 +0900
@@ -1,16 +1,25 @@
package app.bbs;
+import java.util.HashMap;
+import java.util.LinkedList;
import alice.jungle.remote.RemoteConfig;
+import alice.topology.HostMessage;
+import alice.topology.manager.IncomingHosts;
+import alice.topology.manager.NodeInfo;
import alice.topology.node.TopologyNode;
import app.bbs.codesegment.StartBBSCodeSegment;
-
-public class DistributeApp
-{
- public static void main( String[] args ) throws Exception
- {
- RemoteConfig conf = new RemoteConfig(args);
- new TopologyNode(conf, new StartBBSCodeSegment(args, conf.bbsPort));
+public class DistributeApp {
+ public static void main(String[] args) throws Exception {
+ RemoteConfig conf = new RemoteConfig(args);
+ if (conf.getManagerHostName() == null) {
+ String localHostName ="localhost";
+ HostMessage host = new HostMessage(localHostName, conf.localPort);
+ StartBBSCodeSegment cs1 = new StartBBSCodeSegment(args, conf.bbsPort);
+ cs1.ods.put("host", "node0");
+ } else {
+ new TopologyNode(conf, new StartBBSCodeSegment(args, conf.bbsPort));
+ }
}
}
diff -r bd6dbbd83445 -r 69b5565c4a63 src/main/java/app/bbs/codesegment/StartBBSCodeSegment.java
--- a/src/main/java/app/bbs/codesegment/StartBBSCodeSegment.java Sat Jul 05 16:14:47 2014 +0900
+++ b/src/main/java/app/bbs/codesegment/StartBBSCodeSegment.java Sat Jul 05 18:28:40 2014 +0900
@@ -42,6 +42,7 @@
host.setKey("host");
}
+ @Override
public void run() {
String name = host.asString();
Matcher matcher = pattern.matcher(name);