You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ca...@apache.org on 2022/12/15 15:10:52 UTC

[iotdb] 01/01: perfect Cluster-Setup doc

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

caogaofei pushed a commit to branch beyyes/cluster_doc
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit c1f643a53b5bc670b78782bc9962eb4d2e98656c
Author: Beyyes <cg...@foxmail.com>
AuthorDate: Thu Dec 15 23:10:31 2022 +0800

    perfect Cluster-Setup doc
---
 docs/UserGuide/Cluster/Cluster-Setup.md    | 27 +++++++++++++++------------
 docs/zh/UserGuide/Cluster/Cluster-Setup.md | 29 ++++++++++++++++-------------
 2 files changed, 31 insertions(+), 25 deletions(-)

diff --git a/docs/UserGuide/Cluster/Cluster-Setup.md b/docs/UserGuide/Cluster/Cluster-Setup.md
index 48bc041b1c..ef78c70d11 100644
--- a/docs/UserGuide/Cluster/Cluster-Setup.md
+++ b/docs/UserGuide/Cluster/Cluster-Setup.md
@@ -28,7 +28,8 @@ This document describes how to install and start IoTDB Cluster (1.0.0).
 1. JDK>=1.8.
 2. Max open file 65535.
 3. Disable the swap memory.
-4. Ensure there are no data dir or the data dir is empty before the Node is started for the first time.
+4. Ensure that data/confignode directory has been cleared when starting the ConfigNode for the first time,
+and data/datanode directory has been cleared when starting the DataNode for the first time
 5. Turn off the firewall of the server if the entire cluster is in a trusted environment.
 6. By default, IoTDB Cluster will use ports 22277, 22278 for the ConfigNode and 
 6667, 8777, 9003, 40010 and 50010 for the DataNode. 
@@ -286,20 +287,22 @@ Please read the [Cli manual](https://iotdb.apache.org/UserGuide/Master/QuickStar
 ## 6.3 Verify Cluster
 
 Use a 3C3D(3 ConfigNodes and 3 DataNodes) as an example.
-Run the `show cluster details` command on the Cli, You will see the following results:
+Assumed that the IP addresses of the 3 ConfigNodes are 192.168.1.10, 192.168.1.11 and 192.168.1.12, and the default ports 22277 and 22278 are used.
+Assumed that the IP addresses of the 3 DataNodes are 192.168.1.20, 192.168.1.21, and 192.168.1.22, and the default ports 9003, 6667, 40010, 50010 and 8777 are used.
+After starting the cluster successfully according to chapter 6.1, you can run the `show cluster details` command on the Cli, and you will see the following results:
 
 ```
 IoTDB> show cluster details
-+------+----------+-------+---------------+------------+-------------------+----------+-------+-----------------+-------------------+-------+
-|NodeID|  NodeType| Status|InternalAddress|InternalPort|ConfigConsensusPort|RpcAddress|RpcPort|DataConsensusPort|SchemaConsensusPort|MppPort|
-+------+----------+-------+---------------+------------+-------------------+----------+-------+-----------------+-------------------+-------+
-|     0|ConfigNode|Running|      127.0.0.1|       22277|              22278|          |       |                 |                   |       |
-|     2|ConfigNode|Running|      127.0.0.1|       22279|              22280|          |       |                 |                   |       |
-|     3|ConfigNode|Running|      127.0.0.1|       22281|              22282|          |       |                 |                   |       |
-|     1|  DataNode|Running|      127.0.0.1|        9003|                   | 127.0.0.1|   6667|            40010|              50010|   8777|
-|     4|  DataNode|Running|      127.0.0.1|        9004|                   | 127.0.0.1|   6668|            40011|              50011|   8778|
-|     5|  DataNode|Running|      127.0.0.1|        9005|                   | 127.0.0.1|   6669|            40012|              50012|   8779|
-+------+----------+-------+---------------+------------+-------------------+----------+-------+-----------------+-------------------+-------+
++------+----------+-------+---------------+------------+-------------------+------------+-------+-----------------+-------------------+-------+
+|NodeID|  NodeType| Status|InternalAddress|InternalPort|ConfigConsensusPort|  RpcAddress|RpcPort|DataConsensusPort|SchemaConsensusPort|MppPort|
++------+----------+-------+---------------+------------+-------------------+------------+-------+-----------------+-------------------+-------+
+|     0|ConfigNode|Running|   192.168.1.10|       22277|              22278|            |       |                 |                   |       |
+|     2|ConfigNode|Running|   192.168.1.11|       22277|              22278|            |       |                 |                   |       |
+|     3|ConfigNode|Running|   192.168.1.12|       22277|              22278|            |       |                 |                   |       |
+|     1|  DataNode|Running|   192.168.1.20|        9003|                   |192.168.1.20|   6667|            40010|              50010|   8777|
+|     4|  DataNode|Running|   192.168.1.21|        9003|                   |192.168.1.21|   6667|            40010|              50010|   8777|
+|     5|  DataNode|Running|   192.168.1.22|        9003|                   |192.168.1.22|   6667|            40010|              50010|   8777|
++------+----------+-------+---------------+------------+-------------------+------------+-------+-----------------+-------------------+-------+
 Total line number = 6
 It costs 0.012s
 ```
diff --git a/docs/zh/UserGuide/Cluster/Cluster-Setup.md b/docs/zh/UserGuide/Cluster/Cluster-Setup.md
index ab4729acf5..cab4b6683d 100644
--- a/docs/zh/UserGuide/Cluster/Cluster-Setup.md
+++ b/docs/zh/UserGuide/Cluster/Cluster-Setup.md
@@ -28,7 +28,7 @@
 1. JDK>=1.8 的运行环境,并配置好 JAVA_HOME 环境变量。
 2. 设置最大文件打开数为 65535。
 3. 关闭交换内存。
-4. 第一次启动节点时,确保该节点不存在 data 目录或 data 目录为空。
+4. 首次启动ConfigNode节点时,确保已清空ConfigNode节点的data/confignode目录;首次启动DataNode节点时,确保已清空DataNode节点的data/datanode目录。
 5. 如果整个集群处在可信环境下,可以关闭机器上的防火墙选项。
 6. 在集群默认配置中,ConfigNode 会占用端口 22277 和 22278,DataNode 会占用端口 6667、8777、9003、40010 和 50010,
 请确保这些端口未被占用,或者手动修改配置文件中的端口配置。
@@ -278,21 +278,24 @@ DataNode 的其它配置参数可参考
 
 ## 6.3 验证集群
 
-以本地启动的 3C3D(3个 ConfigNode 和3个 DataNode) 集群为例,
-在 Cli 执行 `show cluster details`,结果如下:
+以在6台服务器上启动的3C3D(3个ConfigNode 和 3个DataNode)集群为例,
+这里假设3个ConfigNode的IP地址依次为192.168.1.10、192.168.1.11、192.168.1.12,且3个ConfigNode启动时均使用了默认的端口22277与22278;
+3个DataNode的IP地址依次为192.168.1.20、192.168.1.21、192.168.1.22,且3个DataNode启动时均使用了默认的端口9003、6667、40010、50010与8777。
+
+当按照6.1步骤成功启动集群后,在 Cli 执行 `show cluster details`,看到的结果应当如下:
 
 ```
 IoTDB> show cluster details
-+------+----------+-------+---------------+------------+-------------------+----------+-------+-----------------+-------------------+-------+
-|NodeID|  NodeType| Status|InternalAddress|InternalPort|ConfigConsensusPort|RpcAddress|RpcPort|DataConsensusPort|SchemaConsensusPort|MppPort|
-+------+----------+-------+---------------+------------+-------------------+----------+-------+-----------------+-------------------+-------+
-|     0|ConfigNode|Running|      127.0.0.1|       22277|              22278|          |       |                 |                   |       |
-|     2|ConfigNode|Running|      127.0.0.1|       22279|              22280|          |       |                 |                   |       |
-|     3|ConfigNode|Running|      127.0.0.1|       22281|              22282|          |       |                 |                   |       |
-|     1|  DataNode|Running|      127.0.0.1|        9003|                   | 127.0.0.1|   6667|            40010|              50010|   8777|
-|     4|  DataNode|Running|      127.0.0.1|        9004|                   | 127.0.0.1|   6668|            40011|              50011|   8778|
-|     5|  DataNode|Running|      127.0.0.1|        9005|                   | 127.0.0.1|   6669|            40012|              50012|   8779|
-+------+----------+-------+---------------+------------+-------------------+----------+-------+-----------------+-------------------+-------+
++------+----------+-------+---------------+------------+-------------------+------------+-------+-----------------+-------------------+-------+
+|NodeID|  NodeType| Status|InternalAddress|InternalPort|ConfigConsensusPort|  RpcAddress|RpcPort|DataConsensusPort|SchemaConsensusPort|MppPort|
++------+----------+-------+---------------+------------+-------------------+------------+-------+-----------------+-------------------+-------+
+|     0|ConfigNode|Running|   192.168.1.10|       22277|              22278|            |       |                 |                   |       |
+|     2|ConfigNode|Running|   192.168.1.11|       22277|              22278|            |       |                 |                   |       |
+|     3|ConfigNode|Running|   192.168.1.12|       22277|              22278|            |       |                 |                   |       |
+|     1|  DataNode|Running|   192.168.1.20|        9003|                   |192.168.1.20|   6667|            40010|              50010|   8777|
+|     4|  DataNode|Running|   192.168.1.21|        9003|                   |192.168.1.21|   6667|            40010|              50010|   8777|
+|     5|  DataNode|Running|   192.168.1.22|        9003|                   |192.168.1.22|   6667|            40010|              50010|   8777|
++------+----------+-------+---------------+------------+-------------------+------------+-------+-----------------+-------------------+-------+
 Total line number = 6
 It costs 0.012s
 ```