You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by hx...@apache.org on 2020/12/10 14:37:24 UTC

[iotdb] 01/01: change cluster_rpc_port to 6667

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

hxd pushed a commit to branch change_rpc_port
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit 0f87793a5c5bcf6b85496f8a8877562f12e65390
Author: xiangdong huang <sa...@gmail.com>
AuthorDate: Thu Dec 10 22:36:50 2020 +0800

    change cluster_rpc_port to 6667
---
 .../resources/conf/iotdb-cluster.properties        |  5 +--
 .../java/org/apache/iotdb/cluster/ClientMain.java  |  4 +-
 .../java/org/apache/iotdb/cluster/ClusterMain.java |  6 ++-
 .../apache/iotdb/cluster/config/ClusterConfig.java |  5 +--
 .../cluster/common/TestPartitionedLogManager.java  |  5 ++-
 .../cluster/integration/BaseSingleNodeTest.java    |  5 ++-
 .../apache/iotdb/cluster/log/HardStateTest.java    |  3 +-
 .../cluster/log/applier/MetaLogApplierTest.java    |  3 +-
 .../cluster/log/logtypes/SerializeLogTest.java     |  3 +-
 .../cluster/partition/SlotPartitionTableTest.java  | 14 ++++---
 .../handlers/caller/HeartbeatHandlerTest.java      |  3 +-
 .../cluster/server/member/DataGroupMemberTest.java |  5 ++-
 .../cluster/server/member/MetaGroupMemberTest.java |  3 +-
 .../HardStateTest.java => utils/Constants.java}    | 29 ++------------
 docs/UserGuide/Server/Cluster Setup.md             | 12 +++---
 docs/UserGuide/System Tools/NodeTool.md            | 42 ++++++++++-----------
 docs/zh/UserGuide/Server/Cluster Setup.md          | 12 +++---
 docs/zh/UserGuide/System Tools/NodeTool.md         | 44 +++++++++++-----------
 18 files changed, 96 insertions(+), 107 deletions(-)

diff --git a/cluster/src/assembly/resources/conf/iotdb-cluster.properties b/cluster/src/assembly/resources/conf/iotdb-cluster.properties
index 640cfba..840aa15 100644
--- a/cluster/src/assembly/resources/conf/iotdb-cluster.properties
+++ b/cluster/src/assembly/resources/conf/iotdb-cluster.properties
@@ -33,9 +33,6 @@ internal_meta_port=9003
 # port for data service
 internal_data_port=40010
 
-# port for client service
-cluster_rpc_port=55560
-
 # comma-separated {IP/DOMAIN}:meta_port:data_port:client_port pairs
 # when used by start-node.sh(.bat), this configuration means the nodes that will form the initial
 # cluster, some every node that use start-node.sh(.bat) should have the SAME SEED_NODES, or the
@@ -46,7 +43,7 @@ cluster_rpc_port=55560
 # nodes that already in the cluster, unnecessary to be the nodes that were used to build the
 # initial cluster by start-node.sh(.bat). Several nodes will be picked randomly to send the
 # request, the number of nodes picked depends on the number of retries.
-seed_nodes=127.0.0.1:9003:40010:55560,127.0.0.1:9005:40012:55561,127.0.0.1:9007:40014:55562
+seed_nodes=127.0.0.1:9003:40010:6667,127.0.0.1:9005:40012:6668,127.0.0.1:9007:40014:6669
 
 # whether to use thrift compressed protocol for internal communications. If you want to change
 # compression settings for external clients, please modify 'rpc_thrift_compression_enable' in
diff --git a/cluster/src/main/java/org/apache/iotdb/cluster/ClientMain.java b/cluster/src/main/java/org/apache/iotdb/cluster/ClientMain.java
index 5da4e52..b263a65 100644
--- a/cluster/src/main/java/org/apache/iotdb/cluster/ClientMain.java
+++ b/cluster/src/main/java/org/apache/iotdb/cluster/ClientMain.java
@@ -84,7 +84,7 @@ public class ClientMain {
   private static Options options = new Options();
 
   private static String ip = "127.0.0.1";
-  private static int port = 55560;
+  private static int port = 6667;
 
   static {
     options.addOption(new Option(PARAM_INSERTION, "Perform insertion"));
@@ -207,7 +207,7 @@ public class ClientMain {
         queryPorts = parseIntArray(commandLine.getOptionValue(PARAM_QUERY_PORTS));
       }
       if (queryPorts == null) {
-        queryPorts = new int[]{55560, 55561, 55562};
+        queryPorts = new int[]{port, port + 1, port + 2};
       }
       for (int queryPort : queryPorts) {
         System.out.println("Test port: " + queryPort);
diff --git a/cluster/src/main/java/org/apache/iotdb/cluster/ClusterMain.java b/cluster/src/main/java/org/apache/iotdb/cluster/ClusterMain.java
index b382242..90d491c 100644
--- a/cluster/src/main/java/org/apache/iotdb/cluster/ClusterMain.java
+++ b/cluster/src/main/java/org/apache/iotdb/cluster/ClusterMain.java
@@ -71,7 +71,11 @@ public class ClusterMain {
           +               "node2:meta_port:data_port:cluster_rpc_port,"
           +           "...,noden:meta_port:data_port:cluster_rpc_port,>] "
           + "[-sc] "
-          + "[-rpc_port <rpc port>]");
+          + "[-rpc_port <rpc port>]\n"
+          + "-s: start the node as a seed"
+          + "-a: start the node as a new node"
+          + "-r: remove the node out of the cluster"
+          + "");
       return;
     }
     String mode = args[0];
diff --git a/cluster/src/main/java/org/apache/iotdb/cluster/config/ClusterConfig.java b/cluster/src/main/java/org/apache/iotdb/cluster/config/ClusterConfig.java
index 4d5d05b..a44703f 100644
--- a/cluster/src/main/java/org/apache/iotdb/cluster/config/ClusterConfig.java
+++ b/cluster/src/main/java/org/apache/iotdb/cluster/config/ClusterConfig.java
@@ -29,14 +29,13 @@ public class ClusterConfig {
   private String clusterRpcIp = "127.0.0.1";
   private int internalMetaPort = 9003;
   private int internalDataPort = 40010;
-  private int clusterRpcPort = 55560;
+  private int clusterRpcPort = 6667;
 
   /**
    * each one is a "<IP | domain name>:<meta port>:<data port>:<client port></>" string tuple
    */
   private List<String> seedNodeUrls = Arrays
-      .asList("127.0.0.1:9003:40010:55560", "127.0.0.1:9005:40012:55561",
-          "127.0.0.1:9007:40014:55562");
+      .asList(String.format("127.0.0.1:%d:%d:%d", internalMetaPort, internalDataPort, clusterRpcPort));
 
   @ClusterConsistent
   private boolean isRpcThriftCompressionEnabled = false;
diff --git a/cluster/src/test/java/org/apache/iotdb/cluster/common/TestPartitionedLogManager.java b/cluster/src/test/java/org/apache/iotdb/cluster/common/TestPartitionedLogManager.java
index b4f0e6e..790d048 100644
--- a/cluster/src/test/java/org/apache/iotdb/cluster/common/TestPartitionedLogManager.java
+++ b/cluster/src/test/java/org/apache/iotdb/cluster/common/TestPartitionedLogManager.java
@@ -24,11 +24,12 @@ import org.apache.iotdb.cluster.log.manage.PartitionedSnapshotLogManager;
 import org.apache.iotdb.cluster.log.snapshot.SnapshotFactory;
 import org.apache.iotdb.cluster.partition.PartitionTable;
 import org.apache.iotdb.cluster.rpc.thrift.Node;
+import org.apache.iotdb.cluster.utils.Constants;
 
 public class TestPartitionedLogManager extends PartitionedSnapshotLogManager {
 
   public TestPartitionedLogManager() {
-    super(new TestLogApplier(), null, new Node("localhost", 30001, 1, 40001, 55560), null, null,
+    super(new TestLogApplier(), null, new Node("localhost", 30001, 1, 40001, Constants.RPC_PORT), null, null,
         null);
   }
 
@@ -36,7 +37,7 @@ public class TestPartitionedLogManager extends PartitionedSnapshotLogManager {
       PartitionTable partitionTable,
       Node header,
       SnapshotFactory factory) {
-    super(logApplier, partitionTable, header, new Node("localhost", 30001, 1, 40001, 55560),
+    super(logApplier, partitionTable, header, new Node("localhost", 30001, 1, 40001, Constants.RPC_PORT),
         factory,
         null);
   }
diff --git a/cluster/src/test/java/org/apache/iotdb/cluster/integration/BaseSingleNodeTest.java b/cluster/src/test/java/org/apache/iotdb/cluster/integration/BaseSingleNodeTest.java
index 8b30b8e..605aa77 100644
--- a/cluster/src/test/java/org/apache/iotdb/cluster/integration/BaseSingleNodeTest.java
+++ b/cluster/src/test/java/org/apache/iotdb/cluster/integration/BaseSingleNodeTest.java
@@ -24,6 +24,7 @@ import java.util.List;
 import org.apache.iotdb.cluster.common.EnvironmentUtils;
 import org.apache.iotdb.cluster.config.ClusterDescriptor;
 import org.apache.iotdb.cluster.server.MetaClusterServer;
+import org.apache.iotdb.cluster.utils.Constants;
 import org.apache.iotdb.rpc.IoTDBConnectionException;
 import org.apache.iotdb.session.Session;
 import org.junit.After;
@@ -60,7 +61,7 @@ public abstract class BaseSingleNodeTest {
     autoCreateSchema = ClusterDescriptor.getInstance().getConfig().isEnableAutoCreateSchema();
     ClusterDescriptor.getInstance().getConfig().setUseAsyncServer(true);
     ClusterDescriptor.getInstance().getConfig().setSeedNodeUrls(Collections.singletonList(
-        "127.0.0.1:9003:40011:55560"));
+        String.format("127.0.0.1:9003:40011:%d", Constants.RPC_PORT)));
     ClusterDescriptor.getInstance().getConfig().setReplicationNum(1);
     ClusterDescriptor.getInstance().getConfig().setEnableAutoCreateSchema(true);
   }
@@ -73,7 +74,7 @@ public abstract class BaseSingleNodeTest {
   }
 
   public Session openSession() throws IoTDBConnectionException {
-    Session session = new Session("127.0.0.1", 55560);
+    Session session = new Session("127.0.0.1", Constants.RPC_PORT);
     session.open();
     return session;
   }
diff --git a/cluster/src/test/java/org/apache/iotdb/cluster/log/HardStateTest.java b/cluster/src/test/java/org/apache/iotdb/cluster/log/HardStateTest.java
index 3425322..7295c9a 100644
--- a/cluster/src/test/java/org/apache/iotdb/cluster/log/HardStateTest.java
+++ b/cluster/src/test/java/org/apache/iotdb/cluster/log/HardStateTest.java
@@ -23,6 +23,7 @@ import static org.junit.Assert.assertEquals;
 
 import java.nio.ByteBuffer;
 import org.apache.iotdb.cluster.rpc.thrift.Node;
+import org.apache.iotdb.cluster.utils.Constants;
 import org.junit.Test;
 
 public class HardStateTest {
@@ -32,7 +33,7 @@ public class HardStateTest {
     // Not NULL
     HardState state = new HardState();
     state.setCurrentTerm(2);
-    state.setVoteFor(new Node("127.0.0.1", 30000, 0, 40000, 55560));
+    state.setVoteFor(new Node("127.0.0.1", 30000, 0, 40000, Constants.RPC_PORT));
     ByteBuffer buffer = state.serialize();
     HardState newState = HardState.deserialize(buffer);
     assertEquals(state, newState);
diff --git a/cluster/src/test/java/org/apache/iotdb/cluster/log/applier/MetaLogApplierTest.java b/cluster/src/test/java/org/apache/iotdb/cluster/log/applier/MetaLogApplierTest.java
index 95c8fe4..a0235c5 100644
--- a/cluster/src/test/java/org/apache/iotdb/cluster/log/applier/MetaLogApplierTest.java
+++ b/cluster/src/test/java/org/apache/iotdb/cluster/log/applier/MetaLogApplierTest.java
@@ -34,6 +34,7 @@ import org.apache.iotdb.cluster.log.logtypes.AddNodeLog;
 import org.apache.iotdb.cluster.log.logtypes.PhysicalPlanLog;
 import org.apache.iotdb.cluster.log.logtypes.RemoveNodeLog;
 import org.apache.iotdb.cluster.rpc.thrift.Node;
+import org.apache.iotdb.cluster.utils.Constants;
 import org.apache.iotdb.db.exception.StorageEngineException;
 import org.apache.iotdb.db.exception.metadata.MetadataException;
 import org.apache.iotdb.db.exception.metadata.StorageGroupNotSetException;
@@ -79,7 +80,7 @@ public class MetaLogApplierTest extends IoTDBTest {
       throws QueryProcessException, StorageGroupNotSetException, StorageEngineException {
     nodes.clear();
 
-    Node node = new Node("localhost", 1111, 0, 2222, 55560);
+    Node node = new Node("localhost", 1111, 0, 2222, Constants.RPC_PORT);
     AddNodeLog log = new AddNodeLog();
     log.setNewNode(node);
     applier.apply(log);
diff --git a/cluster/src/test/java/org/apache/iotdb/cluster/log/logtypes/SerializeLogTest.java b/cluster/src/test/java/org/apache/iotdb/cluster/log/logtypes/SerializeLogTest.java
index 09b42e4..3d66524 100644
--- a/cluster/src/test/java/org/apache/iotdb/cluster/log/logtypes/SerializeLogTest.java
+++ b/cluster/src/test/java/org/apache/iotdb/cluster/log/logtypes/SerializeLogTest.java
@@ -30,6 +30,7 @@ import org.apache.iotdb.cluster.exception.UnknownLogTypeException;
 import org.apache.iotdb.cluster.log.Log;
 import org.apache.iotdb.cluster.log.LogParser;
 import org.apache.iotdb.cluster.rpc.thrift.Node;
+import org.apache.iotdb.cluster.utils.Constants;
 import org.apache.iotdb.db.exception.metadata.IllegalPathException;
 import org.apache.iotdb.db.exception.query.QueryProcessException;
 import org.apache.iotdb.db.metadata.PartialPath;
@@ -89,7 +90,7 @@ public class SerializeLogTest {
     AddNodeLog log = new AddNodeLog();
     log.setCurrLogIndex(2);
     log.setCurrLogTerm(2);
-    log.setNewNode(new Node("apache.iotdb.com", 1234, 1, 4321, 55560));
+    log.setNewNode(new Node("apache.iotdb.com", 1234, 1, 4321, Constants.RPC_PORT));
     ByteBuffer byteBuffer = log.serialize();
     Log logPrime = LogParser.getINSTANCE().parse(byteBuffer);
     assertEquals(log, logPrime);
diff --git a/cluster/src/test/java/org/apache/iotdb/cluster/partition/SlotPartitionTableTest.java b/cluster/src/test/java/org/apache/iotdb/cluster/partition/SlotPartitionTableTest.java
index 801d0c1..b4a8a51 100644
--- a/cluster/src/test/java/org/apache/iotdb/cluster/partition/SlotPartitionTableTest.java
+++ b/cluster/src/test/java/org/apache/iotdb/cluster/partition/SlotPartitionTableTest.java
@@ -45,6 +45,7 @@ import org.apache.iotdb.cluster.partition.slot.SlotNodeRemovalResult;
 import org.apache.iotdb.cluster.partition.slot.SlotPartitionTable;
 import org.apache.iotdb.cluster.query.ClusterPlanRouter;
 import org.apache.iotdb.cluster.rpc.thrift.Node;
+import org.apache.iotdb.cluster.utils.Constants;
 import org.apache.iotdb.cluster.utils.PartitionUtils;
 import org.apache.iotdb.db.auth.AuthException;
 import org.apache.iotdb.db.engine.StorageEngine;
@@ -199,13 +200,14 @@ public class SlotPartitionTableTest {
 
   private void assertGetHeaderGroup(int start, int last) {
     PartitionGroup group = localTable
-        .getHeaderGroup(new Node("localhost", 30000 + start, start, 40000 + start, 55560 + start));
+        .getHeaderGroup(new Node("localhost", 30000 + start, start, 40000 + start,
+            Constants.RPC_PORT + start));
     assertEquals(replica_size, group.size());
-    assertEquals(new Node("localhost", 30000 + start, start, 40000 + start, 55560 + start),
-        group.getHeader());
+    assertEquals(new Node("localhost", 30000 + start, start, 40000 + start,
+            Constants.RPC_PORT + start),  group.getHeader());
     assertEquals(
-        new Node("localhost", 30000 + last, last, 40000 + last, 55560 + start),
-        group.get(replica_size - 1));
+        new Node("localhost", 30000 + last, last, 40000 + last,
+            Constants.RPC_PORT + start), group.get(replica_size - 1));
   }
 
   private void assertPartitionGroup(PartitionGroup group, int... nodeIds) {
@@ -505,7 +507,7 @@ public class SlotPartitionTableTest {
   }
 
   private Node getNode(int i) {
-    return new Node("localhost", 30000 + i, i, 40000 + i, 55560 + i);
+    return new Node("localhost", 30000 + i, i, 40000 + i, Constants.RPC_PORT + i);
   }
 
   @Test
diff --git a/cluster/src/test/java/org/apache/iotdb/cluster/server/handlers/caller/HeartbeatHandlerTest.java b/cluster/src/test/java/org/apache/iotdb/cluster/server/handlers/caller/HeartbeatHandlerTest.java
index ddd536a..7efc9b2 100644
--- a/cluster/src/test/java/org/apache/iotdb/cluster/server/handlers/caller/HeartbeatHandlerTest.java
+++ b/cluster/src/test/java/org/apache/iotdb/cluster/server/handlers/caller/HeartbeatHandlerTest.java
@@ -33,6 +33,7 @@ import org.apache.iotdb.cluster.rpc.thrift.HeartBeatResponse;
 import org.apache.iotdb.cluster.rpc.thrift.Node;
 import org.apache.iotdb.cluster.server.Response;
 import org.apache.iotdb.cluster.server.member.MetaGroupMember;
+import org.apache.iotdb.cluster.utils.Constants;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
@@ -72,7 +73,7 @@ public class HeartbeatHandlerTest {
     HeartBeatResponse response = new HeartBeatResponse();
     response.setTerm(Response.RESPONSE_AGREE);
     response.setLastLogTerm(-2);
-    response.setFollower(new Node("192.168.0.6", 9003, 6, 40010, 55560));
+    response.setFollower(new Node("192.168.0.6", 9003, 6, 40010, Constants.RPC_PORT));
     catchUpFlag = false;
     for (int i = 0; i < looseInconsistentNum; i++) {
       handler.onComplete(response);
diff --git a/cluster/src/test/java/org/apache/iotdb/cluster/server/member/DataGroupMemberTest.java b/cluster/src/test/java/org/apache/iotdb/cluster/server/member/DataGroupMemberTest.java
index 96dc257..aaf95ba 100644
--- a/cluster/src/test/java/org/apache/iotdb/cluster/server/member/DataGroupMemberTest.java
+++ b/cluster/src/test/java/org/apache/iotdb/cluster/server/member/DataGroupMemberTest.java
@@ -81,6 +81,7 @@ import org.apache.iotdb.cluster.server.handlers.caller.GenericHandler;
 import org.apache.iotdb.cluster.server.handlers.caller.PullMeasurementSchemaHandler;
 import org.apache.iotdb.cluster.server.handlers.caller.PullSnapshotHandler;
 import org.apache.iotdb.cluster.server.service.DataAsyncService;
+import org.apache.iotdb.cluster.utils.Constants;
 import org.apache.iotdb.db.engine.StorageEngine;
 import org.apache.iotdb.db.engine.modification.Deletion;
 import org.apache.iotdb.db.engine.storagegroup.StorageGroupProcessor;
@@ -311,8 +312,8 @@ public class DataGroupMemberTest extends MemberTest {
     testMetaMember.getTerm().set(10);
     List<Log> metaLogs = TestUtils.prepareTestLogs(6);
     metaLogManager.append(metaLogs);
-    Node voteFor = new Node("127.0.0.1", 30000, 0, 40000, 55560);
-    Node elector = new Node("127.0.0.1", 30001, 1, 40001, 55561);
+    Node voteFor = new Node("127.0.0.1", 30000, 0, 40000, Constants.RPC_PORT);
+    Node elector = new Node("127.0.0.1", 30001, 1, 40001, Constants.RPC_PORT + 1);
 
     // a request with smaller term
     ElectionRequest electionRequest = new ElectionRequest();
diff --git a/cluster/src/test/java/org/apache/iotdb/cluster/server/member/MetaGroupMemberTest.java b/cluster/src/test/java/org/apache/iotdb/cluster/server/member/MetaGroupMemberTest.java
index 32b0b30..fdc517b 100644
--- a/cluster/src/test/java/org/apache/iotdb/cluster/server/member/MetaGroupMemberTest.java
+++ b/cluster/src/test/java/org/apache/iotdb/cluster/server/member/MetaGroupMemberTest.java
@@ -92,6 +92,7 @@ import org.apache.iotdb.cluster.server.handlers.caller.GenericHandler;
 import org.apache.iotdb.cluster.server.heartbeat.DataHeartbeatServer;
 import org.apache.iotdb.cluster.server.service.MetaAsyncService;
 import org.apache.iotdb.cluster.utils.ClusterUtils;
+import org.apache.iotdb.cluster.utils.Constants;
 import org.apache.iotdb.cluster.utils.StatusUtils;
 import org.apache.iotdb.db.auth.AuthException;
 import org.apache.iotdb.db.auth.authorizer.IAuthorizer;
@@ -921,7 +922,7 @@ public class MetaGroupMemberTest extends MemberTest {
     request.setLeaderCommit(0);
     request.setPrevLogIndex(-1);
     request.setPrevLogTerm(-1);
-    request.setLeader(new Node("127.0.0.1", 30000, 0, 40000, 55560));
+    request.setLeader(new Node("127.0.0.1", 30000, 0, 40000, Constants.RPC_PORT));
     AtomicReference<Long> result = new AtomicReference<>();
     GenericHandler<Long> handler = new GenericHandler<>(TestUtils.getNode(0), result);
     new MetaAsyncService(testMetaMember).appendEntry(request, handler);
diff --git a/cluster/src/test/java/org/apache/iotdb/cluster/log/HardStateTest.java b/cluster/src/test/java/org/apache/iotdb/cluster/utils/Constants.java
similarity index 53%
copy from cluster/src/test/java/org/apache/iotdb/cluster/log/HardStateTest.java
copy to cluster/src/test/java/org/apache/iotdb/cluster/utils/Constants.java
index 3425322..967052a 100644
--- a/cluster/src/test/java/org/apache/iotdb/cluster/log/HardStateTest.java
+++ b/cluster/src/test/java/org/apache/iotdb/cluster/utils/Constants.java
@@ -17,30 +17,9 @@
  * under the License.
  */
 
-package org.apache.iotdb.cluster.log;
+package org.apache.iotdb.cluster.utils;
 
-import static org.junit.Assert.assertEquals;
+public class Constants {
 
-import java.nio.ByteBuffer;
-import org.apache.iotdb.cluster.rpc.thrift.Node;
-import org.junit.Test;
-
-public class HardStateTest {
-
-  @Test
-  public void testHardState() {
-    // Not NULL
-    HardState state = new HardState();
-    state.setCurrentTerm(2);
-    state.setVoteFor(new Node("127.0.0.1", 30000, 0, 40000, 55560));
-    ByteBuffer buffer = state.serialize();
-    HardState newState = HardState.deserialize(buffer);
-    assertEquals(state, newState);
-
-    // NULL
-    state.setVoteFor(null);
-    buffer = state.serialize();
-    newState = HardState.deserialize(buffer);
-    assertEquals(state, newState);
-  }
-}
\ No newline at end of file
+  public static int RPC_PORT = 6667;
+}
diff --git a/docs/UserGuide/Server/Cluster Setup.md b/docs/UserGuide/Server/Cluster Setup.md
index bbb00e9..bf61a3f 100644
--- a/docs/UserGuide/Server/Cluster Setup.md	
+++ b/docs/UserGuide/Server/Cluster Setup.md	
@@ -65,15 +65,15 @@ When both exist, the specified configuration item will overwrite the configurati
 > sed -i -e 's/31999/32001/g' ./cluster/target/cluster-0.11.0-SNAPSHOT2/conf/cluster-env.sh
 > chmod -R 777 ./cluster/target/
 > nohup ./cluster/target/cluster-0.11.0-SNAPSHOT/sbin/start-node.sh >/dev/null 2>&1 &
-> nohup ./cluster/target/cluster-0.11.0-SNAPSHOT1/sbin/start-node.sh -internal_meta_port 9005 -internal_data_port 40012 -cluster_rpc_port 55561 >/dev/null 2>&1 &
-> nohup ./cluster/target/cluster-0.11.0-SNAPSHOT2/sbin/start-node.sh -internal_meta_port 9007 -internal_data_port 40014 -cluster_rpc_port 55562 >/dev/null 2>&1 &
+> nohup ./cluster/target/cluster-0.11.0-SNAPSHOT1/sbin/start-node.sh -internal_meta_port 9005 -internal_data_port 40012 -cluster_rpc_port 6668 >/dev/null 2>&1 &
+> nohup ./cluster/target/cluster-0.11.0-SNAPSHOT2/sbin/start-node.sh -internal_meta_port 9007 -internal_data_port 40014 -cluster_rpc_port 6669 >/dev/null 2>&1 &
 
 # Second step: Windows (MinGW)
 > sed -i -e 's/31999/32000/g'  cluster\target\cluster-0.11.0-SNAPSHOT\conf\cluster-env.bat
 > sed -i -e 's/31999/32001/g'  cluster\target\cluster-0.11.0-SNAPSHOT\conf\cluster-env.bat
 > nohup cluster\target\cluster-0.11.0-SNAPSHOT\sbin\start-node.bat 
-> nohup cluster\target\cluster-0.11.0-SNAPSHOT1\sbin\start-node.bat  -internal_meta_port 9005 -internal_data_port 40012 -cluster_rpc_port 55561
-> nohup cluster\target\cluster-0.11.0-SNAPSHOT2\sbin\start-node.bat  -internal_meta_port 9007 -internal_data_port 40014 -cluster_rpc_port 55562
+> nohup cluster\target\cluster-0.11.0-SNAPSHOT1\sbin\start-node.bat  -internal_meta_port 9005 -internal_data_port 40012 -cluster_rpc_port 6668
+> nohup cluster\target\cluster-0.11.0-SNAPSHOT2\sbin\start-node.bat  -internal_meta_port 9007 -internal_data_port 40014 -cluster_rpc_port 6669
 ```
 
 Note: The distributed version uses the 707 identifier to instruct the client to do the appropriate metadata cache so that the data can then be sent directly to the leader of the corresponding data group later.
@@ -133,7 +133,7 @@ The configuration items described below are in the `iotdb-cluster.properties` fi
 |:---:|:---|
 |Description|The port used to communicate with the clients (JDBC, CLI, Session API...), please confirm that the port is not reserved by the system and is not occupied|
 |Type|Int32|
-|Default|55560|
+|Default|6667|
 |Effective| After restart system|
 
 * seed\_nodes
@@ -142,7 +142,7 @@ The configuration items described below are in the `iotdb-cluster.properties` fi
 |:---:|:---|
 |Description|The address of the nodes in the cluster, `{IP/DOMAIN}:internal\_meta\_port:internal\_data\_port:cluster\_rpc\_port` format, separated by commas; for the pseudo-distributed mode, you can fill in `localhost`, or `127.0.0.1` or mixed, but the real ip address cannot appear; for the distributed mode, real ip or hostname is supported, but `localhost` or `127.0.0.1` cannot appear. When used by `start-node.sh(.bat)`, this configuration means the nodes that will form the initial clus [...]
 |Type|String|
-|Default|127.0.0.1:9003:40010:55560,127.0.0.1:9005:40012:55561,127.0.0.1:9007:40014:55562|
+|Default|127.0.0.1:9003:40010:6667,127.0.0.1:9005:40012:6668,127.0.0.1:9007:40014:6669|
 |Effective| After restart system|
 
 * rpc\_thrift\_compression\_enable
diff --git a/docs/UserGuide/System Tools/NodeTool.md b/docs/UserGuide/System Tools/NodeTool.md
index bc5387d..cdd11d5 100644
--- a/docs/UserGuide/System Tools/NodeTool.md	
+++ b/docs/UserGuide/System Tools/NodeTool.md	
@@ -56,7 +56,7 @@ You can know each node in the cluster by command `ring`, which prints node ring
 
 3.Examples
 
-> Suppose that the current cluster runs on three nodes: 127.0.0.1:9003:40010:55560, 127.0.0.1:9005:40012:55561, and 127.0.0.1:9007:40014:55562.
+> Suppose that the current cluster runs on three nodes: 127.0.0.1:9003:40010:6667, 127.0.0.1:9005:40012:6668, and 127.0.0.1:9007:40014:6669.
 
 Examples of input instructions for different systems are as follows:
 
@@ -77,9 +77,9 @@ Press enter to execute the command.
 The output of the example instruction is as follows:
 ```
 Node Identifier                                 Node 
-330411070           ->          127.0.0.1:9003:40010:55560 
-330454032           ->          127.0.0.1:9005:40012:55561 
-330496472           ->          127.0.0.1:9007:40014:55562
+330411070           ->          127.0.0.1:9003:40010:6667
+330454032           ->          127.0.0.1:9005:40012:6668 
+330496472           ->          127.0.0.1:9007:40014:6669
 ```
  
 The above output shows that there are three nodes in the current cluster,
@@ -119,7 +119,7 @@ Through this instruction, the user can know the metadata of a certain path,
 
 3.Examples
 
-> Suppose that the current cluster runs on three nodes: 127.0.0.1:9003:40010:55560, 127.0.0.1:9005:40012:55561, and 127.0.0.1:9007:40014:55562.
+> Suppose that the current cluster runs on three nodes: 127.0.0.1:9003:40010:6667, 127.0.0.1:9005:40012:6668, and 127.0.0.1:9007:40014:6669.
 > 
 > The number of copies is 2 and there are 3 storage groups:{ root.beijing , root.shanghai , root.guangzhou}.
 
@@ -138,7 +138,7 @@ Press enter to execute the command.
 
 The output of the example instruction is as follows:
 ```
-DATA<root.guangzhou.d1, 1576723735188, 1576723735188>	->	[127.0.0.1:9003:40010:55560, 127.0.0.1:9005:40012:55561]
+DATA<root.guangzhou.d1, 1576723735188, 1576723735188>	->	[127.0.0.1:9003:40010:6667, 127.0.0.1:9005:40012:6668]
 ```
 
 + Partition of query data (specified time range, time partition interval is one day)
@@ -157,9 +157,9 @@ Press enter to execute the command.
 
 The output of the example instruction is as follows:
 ```
-DATA<root.guangzhou.d1, 1576627200000, 1576713599999>	->	[127.0.0.1:9007:40014:55562, 127.0.0.1:9003:40010:55560] 
-DATA<root.guangzhou.d1, 1576713600000, 1576724778159>	->	[127.0.0.1:9003:40010:55560, 127.0.0.1:9005:40012:55561] 
-DATA<root.guangzhou.d1, 1576624778159, 1576627199999>	->	[127.0.0.1:9005:40012:55561, 127.0.0.1:9007:40014:55562]
+DATA<root.guangzhou.d1, 1576627200000, 1576713599999>	->	[127.0.0.1:9007:40014:6669, 127.0.0.1:9003:40010:6667] 
+DATA<root.guangzhou.d1, 1576713600000, 1576724778159>	->	[127.0.0.1:9003:40010:6667, 127.0.0.1:9005:40012:6668] 
+DATA<root.guangzhou.d1, 1576624778159, 1576627199999>	->	[127.0.0.1:9005:40012:6668, 127.0.0.1:9007:40014:6669]
 ```
 
 + Query metadata partition
@@ -205,7 +205,7 @@ Through this instruction, you can know the number of slots managed by each data
 
 3.Examples
 
-> Suppose that the current cluster runs on three nodes: 127.0.0.1:9003:40010:55560, 127.0.0.1:9005:40012:55561, and 127.0.0.1:9007:40014:55562,
+> Suppose that the current cluster runs on three nodes: 127.0.0.1:9003:40010:6667, 127.0.0.1:9005:40012:6668, and 127.0.0.1:9007:40014:6669,
 > and the number of copies is 2.
 
 + Default Partition Group
@@ -226,8 +226,8 @@ Press enter to execute the command.
 The output of the example instruction is as follows:
 ```
 Raft group                                                 Slot Number
-(127.0.0.1:9003:40010:55560, 127.0.0.1:9005:40012:55561)      ->                3333
-(127.0.0.1:9007:40014:55562, 127.0.0.1:9003:40010:55560)      ->                3334
+(127.0.0.1:9003:40010:6667, 127.0.0.1:9005:40012:6668)      ->                3333
+(127.0.0.1:9007:40014:6669, 127.0.0.1:9003:40010:6667)      ->                3334
 ```
 + All Partition Groups
 
@@ -245,9 +245,9 @@ Press enter to execute the command.
 The output of the example instruction is as follows:
 ```
 Raft group                                                 Slot Number
-(127.0.0.1:9003:40010:55560, 127.0.0.1:9005:40012:55561)      ->                3333
-(127.0.0.1:9005:40012:55561, 127.0.0.1:9007:40014:55562)      ->                3333
-(127.0.0.1:9007:40014:55562, 127.0.0.1:9003:40010:55560)      ->                3334 
+(127.0.0.1:9003:40010:6667, 127.0.0.1:9005:40012:6668)      ->                3333
+(127.0.0.1:9005:40012:6668, 127.0.0.1:9007:40014:6669)      ->                3333
+(127.0.0.1:9007:40014:6669, 127.0.0.1:9003:40010:6667)      ->                3334 
 ```
 
 ### Query node status
@@ -264,7 +264,7 @@ Through this instruction, you can know the current status of all nodes in the cl
 > the value indicates the status of the node, "on" is normal, "off" is abnormal, and the format is \< key -> value>.
 
 3.Examples
-> Suppose that the current cluster runs on three nodes: 127.0.0.1:9003:40010:55560, 127.0.0.1:9005:40012:55561, and 127.0.0.1:9007:40014:55562,
+> Suppose that the current cluster runs on three nodes: 127.0.0.1:9003:40010:6667, 127.0.0.1:9005:40012:6668, and 127.0.0.1:9007:40014:6669,
 > and the number of copies is 2.
 
 Linux and MacOS:
@@ -281,10 +281,10 @@ Press enter to execute the command.
 The output of the example instruction is as follows:
 ```
 Node                                Status 
-127.0.0.1:9003:40010:55560          ->        on 
-127.0.0.1:9005:40012:55561          ->        off
-127.0.0.1:9007:40014:55562          ->        on 
+127.0.0.1:9003:40010:6667          ->        on 
+127.0.0.1:9005:40012:6668          ->        off
+127.0.0.1:9007:40014:6669          ->        on 
 
 ```
-The above output indicates that 127.0.0.1:9003:40010:55560 nodes and 127.0.0.1:9007:40014:55562 nodes are in normal state,
-and 127.0.0.1:9005:40012:55561 nodes cannot provide services.
+The above output indicates that 127.0.0.1:9003:40010:6667 nodes and 127.0.0.1:9007:40014:6669 nodes are in normal state,
+and 127.0.0.1:9005:40012:6668 nodes cannot provide services.
diff --git a/docs/zh/UserGuide/Server/Cluster Setup.md b/docs/zh/UserGuide/Server/Cluster Setup.md
index 4738eed..71bc7d7 100644
--- a/docs/zh/UserGuide/Server/Cluster Setup.md	
+++ b/docs/zh/UserGuide/Server/Cluster Setup.md	
@@ -59,15 +59,15 @@ or
 > sed -i -e 's/31999/32001/g' ./cluster/target/cluster-0.11.0-SNAPSHOT2/conf/cluster-env.sh
 > chmod -R 777 ./cluster/target/
 > nohup ./cluster/target/cluster-0.11.0-SNAPSHOT/sbin/start-node.sh >/dev/null 2>&1 &
-> nohup ./cluster/target/cluster-0.11.0-SNAPSHOT1/sbin/start-node.sh -internal_meta_port 9005 -internal_data_port 40012 -cluster_rpc_port 55561 >/dev/null 2>&1 &
-> nohup ./cluster/target/cluster-0.11.0-SNAPSHOT2/sbin/start-node.sh -internal_meta_port 9007 -internal_data_port 40014 -cluster_rpc_port 55562 >/dev/null 2>&1 &
+> nohup ./cluster/target/cluster-0.11.0-SNAPSHOT1/sbin/start-node.sh -internal_meta_port 9005 -internal_data_port 40012 -cluster_rpc_port 6668 >/dev/null 2>&1 &
+> nohup ./cluster/target/cluster-0.11.0-SNAPSHOT2/sbin/start-node.sh -internal_meta_port 9007 -internal_data_port 40014 -cluster_rpc_port 6669 >/dev/null 2>&1 &
 
 # 第二步: Windows (MinGW)
 > sed -i -e 's/31999/32000/g'  cluster\target\cluster-0.11.0-SNAPSHOT\conf\cluster-env.bat
 > sed -i -e 's/31999/32001/g'  cluster\target\cluster-0.11.0-SNAPSHOT\conf\cluster-env.bat
 > nohup cluster\target\cluster-0.11.0-SNAPSHOT\sbin\start-node.bat 
-> nohup cluster\target\cluster-0.11.0-SNAPSHOT1\sbin\start-node.bat  -internal_meta_port 9005 -internal_data_port 40012 -cluster_rpc_port 55561
-> nohup cluster\target\cluster-0.11.0-SNAPSHOT2\sbin\start-node.bat  -internal_meta_port 9007 -internal_data_port 40014 -cluster_rpc_port 55562
+> nohup cluster\target\cluster-0.11.0-SNAPSHOT1\sbin\start-node.bat  -internal_meta_port 9005 -internal_data_port 40012 -cluster_rpc_port 6668
+> nohup cluster\target\cluster-0.11.0-SNAPSHOT2\sbin\start-node.bat  -internal_meta_port 9007 -internal_data_port 40014 -cluster_rpc_port 6669
 ```
 
 注:分布式版使用了707标识符来指示客户端做相应的元数据缓存以便之后能够直接将数据发送给对应数据组的 leader。因此建议在当前分支重新 `mvn install -pl jdbc -am -Dmaven.test.skip=true` 和
@@ -126,7 +126,7 @@ iotdb-engines.properties配置文件中的部分内容会不再生效:
 |:---:|:---|
 |描述|与客户端(JDBC,Session API, CLI等)通信的端口,请确认该端口不是系统保留端口并且未被占用|
 |类型|Int32|
-|默认值|55560|
+|默认值|6667|
 |改后生效方式|重启服务器生效|
 
 * seed\_nodes
@@ -135,7 +135,7 @@ iotdb-engines.properties配置文件中的部分内容会不再生效:
 |:---:|:---|
 |描述|集群中节点的地址,`{IP/DOMAIN}:internal\_meta\_port:internal\_data\_port:cluster\_rpc\_port`格式,用逗号分割;对于伪分布式模式,可以都填写`localhost`,或是`127.0.0.1` 或是混合填写,但是不能够出现真实的ip地址;对于分布式模式,支持填写real ip 或是hostname,但是不能够出现`localhost`或是`127.0.0.1`。当使用`start-node.sh(.bat)`启动节点时,此配置意味着形成初始群集的节点,每个节点的`seed_nodes`应该一致,否则群集将初始化失败;当使用`add-node.sh(.bat)`添加节点到集群中时,此配置项可以是集群中已经存在的任何节点,不需要是用`start-node.sh(bat)`构建初始集群的节点。|
 |类型|String|
-|默认值|127.0.0.1:9003:40010:55560,127.0.0.1:9005:40012:55561,127.0.0.1:9007:40014:55562|
+|默认值|127.0.0.1:9003:40010:6667,127.0.0.1:9005:40012:6668,127.0.0.1:9007:40014:6669|
 |改后生效方式|重启服务器生效|
 
 * rpc\_thrift\_compression\_enable
diff --git a/docs/zh/UserGuide/System Tools/NodeTool.md b/docs/zh/UserGuide/System Tools/NodeTool.md
index 612b804..822eb80 100644
--- a/docs/zh/UserGuide/System Tools/NodeTool.md	
+++ b/docs/zh/UserGuide/System Tools/NodeTool.md	
@@ -51,7 +51,7 @@ IoTDB集群版采用一致性哈希的方式实现数据分布,用户可以通
 
 3.示例
 
-> 假设当前集群运行在127.0.0.1:9003:40010:55560, 127.0.0.1:9005:40012:55561和127.0.0.1:9007:40014:55562三个节点上。
+> 假设当前集群运行在127.0.0.1:9003:40010:6667, 127.0.0.1:9005:40012:6668 和 127.0.0.1:9007:40014:6669 三个节点上。
 不同系统的输入指令示例如下:
 
 Linux系统与MacOS系统:
@@ -69,9 +69,9 @@ Shell > .\sbin\nodetool.bat -h 127.0.0.1 -p 31999 ring
 回车后即可执行指令。示例指令的输出如下:
 ```
 Node Identifier                                 Node 
-330411070           ->          127.0.0.1:9003:40010:55560 
-330454032           ->          127.0.0.1:9005:40012:55561
-330496472           ->          127.0.0.1:9007:40014:55562
+330411070           ->          127.0.0.1:9003:40010:6667 
+330454032           ->          127.0.0.1:9005:40012:6668
+330496472           ->          127.0.0.1:9007:40014:6669
 ```
  
 上述输出表示当前集群共有3个节点,按照节点标识从小到大输出结果。
@@ -104,7 +104,7 @@ IoTDB集群版的时间序列元数据按照存储组分给多个数据组,其
 
 3.示例
 
-> 假设当前集群运行在127.0.0.1:9003:40010:55560, 127.0.0.1:9005:40012:55561和127.0.0.1:9007:40014:55562三个节点上。
+> 假设当前集群运行在127.0.0.1:9003:40010:6667, 127.0.0.1:9005:40012:6668 和 127.0.0.1:9007:40014:6669 三个节点上。
 > 副本数为2,共有3个存储组:{root.beijing、root.shanghai、root.guangzhou}。
 
 + 查询数据的分区(默认时间范围, 时间按天分区)
@@ -125,7 +125,7 @@ Shell > .\sbin\nodetool.bat -h 127.0.0.1 -p 31999 partition -path root.guangzhou
 回车后即可执行指令。示例指令的输出如下:
 
 ```
-DATA<root.guangzhou.d1, 1576723735188, 1576723735188>	->	[127.0.0.1:9003:40010:55560, 127.0.0.1:9005:40012:55561]
+DATA<root.guangzhou.d1, 1576723735188, 1576723735188>	->	[127.0.0.1:9003:40010:6667, 127.0.0.1:9005:40012:6668]
 ```
 
 + 查询数据的分区(指定时间范围, 时间按天分区)
@@ -147,9 +147,9 @@ Shell > .\sbin\nodetool.bat -h 127.0.0.1 -p 31999 partition -path root.guangzhou
 回车后即可执行指令。示例指令的输出如下:
 
 ```
-DATA<root.guangzhou.d1, 1576627200000, 1576713599999>	->	[127.0.0.1:9007:40014:55562, 127.0.0.1:9003:40010:55560] 
-DATA<root.guangzhou.d1, 1576713600000, 1576724778159>	->	[127.0.0.1:9003:40010:55560, 127.0.0.1:9005:40012:55561] 
-DATA<root.guangzhou.d1, 1576624778159, 1576627199999>	->	[127.0.0.1:9005:40012:55561, 127.0.0.1:9007:40014:55562]
+DATA<root.guangzhou.d1, 1576627200000, 1576713599999>	->	[127.0.0.1:9007:40014:6669, 127.0.0.1:9003:40010:6667] 
+DATA<root.guangzhou.d1, 1576713600000, 1576724778159>	->	[127.0.0.1:9003:40010:6668, 127.0.0.1:9005:40012:6668] 
+DATA<root.guangzhou.d1, 1576624778159, 1576627199999>	->	[127.0.0.1:9005:40012:6667, 127.0.0.1:9007:40014:6669]
 ```
 
 + 查询元数据分区
@@ -171,9 +171,9 @@ Shell > .\sbin\nodetool.bat -h 127.0.0.1 -p 31999 partition -path root.guangzhou
 回车后即可执行指令。示例指令的输出如下:
 
 ```
-DATA<root.guangzhou.d1, 1576723735188, 1576723735188>	->	[127.0.0.1:9003:40010:55560, 127.0.0.1:9005:40012:55561]
+DATA<root.guangzhou.d1, 1576723735188, 1576723735188>	->	[127.0.0.1:9003:40010:6667, 127.0.0.1:9005:40012:6668]
 ```
-上述输出表示root.t1.d1所属的数据分区包含2个节点,其中127.0.0.1:9003:40010:55560为header节点。
+上述输出表示root.t1.d1所属的数据分区包含2个节点,其中127.0.0.1:9003:40010:6667为header节点。
 
 
 ### 查询节点管理的槽数
@@ -194,7 +194,7 @@ IoTDB集群版将哈希环划分为固定数量(默认10000)个槽,并由集
 
 3.示例
 
-> 假设当前集群运行在127.0.0.1:9003:40010:55560, 127.0.0.1:9005:40012:55561和127.0.0.1:9007:40014:55562三个节点上, 副本数为2。
+> 假设当前集群运行在127.0.0.1:9003:40010:6667, 127.0.0.1:9005:40012:6668和127.0.0.1:9007:40014:6669三个节点上, 副本数为2。
 
 + 默认节点所在分区
 
@@ -216,8 +216,8 @@ Shell > .\sbin\nodetool.bat -h 127.0.0.1 -p 31999 host
 
 ```
 Raft group                                                 Slot Number
-(127.0.0.1:9003:40010:55560, 127.0.0.1:9005:40012:55561)      ->                3333
-(127.0.0.1:9007:40014:55562, 127.0.0.1:9003:40010:55560)      ->                3334
+(127.0.0.1:9003:40010:6667, 127.0.0.1:9005:40012:6668)      ->                3333
+(127.0.0.1:9007:40014:6669, 127.0.0.1:9003:40010:6667)      ->                3334
 ```
 
 + 所有分区
@@ -240,9 +240,9 @@ Shell > .\sbin\nodetool.bat -h 127.0.0.1 -p 31999 host -a
 
 ```
 Raft group                                                 Slot Number
-(127.0.0.1:9003:40010:55560, 127.0.0.1:9005:40012:55561)      ->                3333
-(127.0.0.1:9005:40012:55561, 127.0.0.1:9007:40014:55562)      ->                3333
-(127.0.0.1:9007:40014:55562, 127.0.0.1:9003:40010:55560)      ->                3334 
+(127.0.0.1:9003:40010:6667, 127.0.0.1:9005:40012:6668)      ->                3333
+(127.0.0.1:9005:40012:6668, 127.0.0.1:9007:40014:6669)      ->                3333
+(127.0.0.1:9007:40014:6669, 127.0.0.1:9003:40010:6667)      ->                3334 
 ```
 
 ### 查询节点状态
@@ -261,7 +261,7 @@ IoTDB集群版包含多个节点,对于任意节点都存在因为网络、硬
 > 值表示该节点的状态,“on”为正常,“off”为不正常,格式为\<key -> value>。
 
 3.示例
-> 假设当前集群运行在127.0.0.1:9003:40010:55560, 127.0.0.1:9005:40012:55561和127.0.0.1:9007:40014:55562三个节点上, 副本数为2。
+> 假设当前集群运行在127.0.0.1:9003:40010:6667, 127.0.0.1:9005:40012:6668和127.0.0.1:9007:40014:6669三个节点上, 副本数为2。
 
 不同系统的输入指令示例如下:
 
@@ -281,8 +281,8 @@ Shell > .\sbin\nodetool.bat -h 127.0.0.1 -p 31999 status
 
 ```
 Node                                Status 
-127.0.0.1:9003:40010:55560          ->        on 
-127.0.0.1:9005:40012:55561          ->        off 
-127.0.0.1:9007:40014:55562          ->        on
+127.0.0.1:9003:40010:6667          ->        on 
+127.0.0.1:9005:40012:6668          ->        off 
+127.0.0.1:9007:40014:6669          ->        on
 ```
-上述输出表示127.0.0.1:9003:40010:55560节点和127.0.0.1:9007:40014:55562节点状态正常,127.0.0.1:9005:40012:55561节点无法提供服务。
\ No newline at end of file
+上述输出表示127.0.0.1:9003:40010:6667节点和127.0.0.1:9007:40014:6669节点状态正常,127.0.0.1:9005:40012:6668节点无法提供服务。
\ No newline at end of file