This is an automated email from the ASF dual-hosted git repository.

lta pushed a commit to branch lta_example_akka_cluster
in repository https://gitbox.apache.org/repos/asf/incubator-iotdb.git


The following commit(s) were added to refs/heads/lta_example_akka_cluster by 
this push:
     new f43242b  add akka cluster example
f43242b is described below

commit f43242bb030c2c822fdd3a27f12839960241cfd9
Author: lta <[email protected]>
AuthorDate: Mon Mar 4 10:51:40 2019 +0800

    add akka cluster example
---
 iotdb/iotdb/conf/iotdb_cluster.conf                               | 8 --------
 .../src/main/java/org/apache/iotdb/db/cluster/IoTDBClustetr.java  | 4 ----
 iotdb/src/main/java/org/apache/iotdb/db/cluster/IoTDBNode.java    | 2 --
 3 files changed, 14 deletions(-)

diff --git a/iotdb/iotdb/conf/iotdb_cluster.conf 
b/iotdb/iotdb/conf/iotdb_cluster.conf
index 93a8fbe..60f2011 100644
--- a/iotdb/iotdb/conf/iotdb_cluster.conf
+++ b/iotdb/iotdb/conf/iotdb_cluster.conf
@@ -9,8 +9,6 @@ akka {
     }
 
     artery {
-      # change this to enabled=on to use Artery instead of netty
-      # see https://doc.akka.io/docs/akka/current/remoting-artery.html
       enabled = off
       transport = tcp
       canonical.hostname = "127.0.0.1"
@@ -19,16 +17,10 @@ akka {
   }
 
   cluster {
-    # Note - Artery uses akka:// addresses
     seed-nodes = [
       "akka.tcp://[email protected]:2552",
       "akka.tcp://[email protected]:2551"]
-
-    # auto downing is NOT safe for production deployments.
-    # you may want to use it during development, read more about it in the 
docs.
     auto-down-unreachable-after = 10s
   }
 }
 
-# Enable metrics extension in akka-cluster-metrics.
-akka.extensions=["akka.cluster.metrics.ClusterMetricsExtension"]
diff --git a/iotdb/src/main/java/org/apache/iotdb/db/cluster/IoTDBClustetr.java 
b/iotdb/src/main/java/org/apache/iotdb/db/cluster/IoTDBClustetr.java
index a0e0c6c..d431584 100644
--- a/iotdb/src/main/java/org/apache/iotdb/db/cluster/IoTDBClustetr.java
+++ b/iotdb/src/main/java/org/apache/iotdb/db/cluster/IoTDBClustetr.java
@@ -35,11 +35,7 @@ public class IoTDBClustetr {
           
"/Users/litianan/workspace/java/IDEA/IoTDBProject/incubator-iotdb/iotdb/iotdb/conf",
           IoTDBConstant.CLUSTER_CONFIG));
     }
-
-    // Create an Akka system
     ActorSystem system = ActorSystem.create("IoTDBClusterSystem", config);
-
-    // Create an actor that handles cluster domain events
     system.actorOf(IoTDBNode.props(), "clusterListener");
   }
 }
diff --git a/iotdb/src/main/java/org/apache/iotdb/db/cluster/IoTDBNode.java 
b/iotdb/src/main/java/org/apache/iotdb/db/cluster/IoTDBNode.java
index e1dc5ec..24fbd75 100644
--- a/iotdb/src/main/java/org/apache/iotdb/db/cluster/IoTDBNode.java
+++ b/iotdb/src/main/java/org/apache/iotdb/db/cluster/IoTDBNode.java
@@ -26,7 +26,6 @@ public class IoTDBNode extends AbstractActor {
     return Props.create(IoTDBNode.class, () -> new IoTDBNode());
   }
 
-  //subscribe to cluster changes
   @Override
   public void preStart() {
     cluster.subscribe(self(), ClusterEvent.initialStateAsEvents(),
@@ -35,7 +34,6 @@ public class IoTDBNode extends AbstractActor {
     daemon.active();
   }
 
-  //re-subscribe when restart
   @Override
   public void postStop() throws FileNodeManagerException {
     cluster.unsubscribe(self());

Reply via email to