You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ne...@apache.org on 2021/08/20 11:17:09 UTC
[iotdb] branch master updated: [IOTDB-1576] Update cluster setup
document (#3689)
This is an automated email from the ASF dual-hosted git repository.
neuyilan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/master by this push:
new 5edb1a2 [IOTDB-1576] Update cluster setup document (#3689)
5edb1a2 is described below
commit 5edb1a2e15157df326ebf08bb8f28b70c2c17eed
Author: Mrquan <50...@users.noreply.github.com>
AuthorDate: Fri Aug 20 19:16:42 2021 +0800
[IOTDB-1576] Update cluster setup document (#3689)
---
docs/UserGuide/Cluster/Cluster-Setup-Example.md | 191 +++++++-
docs/UserGuide/Cluster/Cluster-Setup.md | 545 ++++++++++++---------
docs/zh/UserGuide/Cluster/Cluster-Setup-Example.md | 225 +++++++--
docs/zh/UserGuide/Cluster/Cluster-Setup.md | 509 +++++++++++--------
4 files changed, 980 insertions(+), 490 deletions(-)
diff --git a/docs/UserGuide/Cluster/Cluster-Setup-Example.md b/docs/UserGuide/Cluster/Cluster-Setup-Example.md
index 80072db..7abf211 100644
--- a/docs/UserGuide/Cluster/Cluster-Setup-Example.md
+++ b/docs/UserGuide/Cluster/Cluster-Setup-Example.md
@@ -22,41 +22,104 @@
## Prerequisite
Note: Please install MinGW or WSL or git bash if you are using Windows.
-## Example of distributed scaffolding for 3 nodes and 3 replicas
+## Example of distributed configurations for 1 node and 1 replica
-Suppose we need to deploy the distributed IoTDB on three physical nodes, A, B, and C, whose public network IP is a_public_IP, b_public_IP, and c_public_IP, and private network IP is a_private_IP, b_private_IP, and c_private_IP.
-Note: If there is no public network IP or private network IP, both can be set to the same, just need to ensure that the client can access the server.
-
-The operation steps are as follows:
-
-1. Use 'mvn clean package -pl cluster -am -DskipTests' to compile the distributed module or directly go into the [website](https://iotdb.apache.org/Download/) to download the latest version.
-2. Make sure ports 6567, 6667, 9003, 9004, 40010, 40011 and 31999 are open on all three nodes.
-3. Send the package to all servers.
-4. Configure all nodes' seed_nodes in conf/iotdb-cluster.properties as "A_private_ip:9003,B_private_ip:9003,C_private_ip:9003"
-5. Configure the internal_ip in conf/iotdb-cluster.properties to be the private_ip of each node.
-6. Configure the default_replica_num in conf/iotdb-cluster.properties to be 3.
-7. Configure rpc_address in conf/iotdb-engine.properties to be the public_ip of each node.
-8. Run sh sbin/start-node.sh on each of the three nodes (or run in the background).
-
-## Example of distributed scaffolding for 1 node and 1 replica
### Compile from source code:
+
```
mvn clean package -DskipTests
chmod -R 777 ./cluster/target/
nohup ./cluster/target/iotdb-cluster-0.13.0-SNAPSHOT/sbin/start-node.sh >/dev/null 2>&1 &
```
+
### Use the official website release version:
+
```
-curl -O https://mirrors.bfsu.edu.cn/apache/iotdb/0.12.0/apache-iotdb-0.12.0-cluster-bin.zip
-unzip apache-iotdb-0.12.0-cluster-bin.zip
-cd apache-iotdb-0.12.0-cluster-bin
+curl -O https://downloads.apache.org/iotdb/0.12.1/apache-iotdb-0.12.1-cluster-bin.zip
+unzip apache-iotdb-0.12.1-cluster-bin.zip
+cd apache-iotdb-0.12.1-cluster-bin
sed -i -e 's/^seed_nodes=127.0.0.1:9003,127.0.0.1:9005,127.0.0.1:9007$/seed_nodes=127.0.0.1:9003/g' conf/iotdb-cluster.properties
sed -i -e 's/^default_replica_num=3$/default_replica_num=1/g' conf/iotdb-cluster.properties
nohup ./sbin/start-node.sh >/dev/null 2>&1 &
```
-## Example of distributed scaffolding for 3 nodes and 1 replica on a single machine
+## Example of distributed configurations for 3 nodes and 1 replica on a single machine
+
+### Configurations
+
+You can start multiple instances on a single machine by modifying the configurations yourself to handling port and file directory conflicts.
+
+**Node1**:**(default)**
+
+***iotdb-cluster.properties***
+
+seed\_nodes = 127.0.0.1:9003,127.0.0.1:9005,127.0.0.1:9007
+
+default\_replica\_num = 1
+
+internal\_meta\_port = 9003
+
+internal\_data\_port = 40010
+
+***iotdb-engine.properties***
+
+rpc\_port=6667
+
+system\_dir=data/system
+data\_dirs=data/data
+wal\_dir=data/wal
+index\_root\_dir=data/index
+udf\_root\_dir=ext/udf
+tracing\_dir=data/tracing
+
+**Node2**:
+
+***iotdb-cluster.properties***
+
+seed\_nodes = 127.0.0.1:9003,127.0.0.1:9005,127.0.0.1:9007
+
+default\_replica\_num = 1
+
+internal\_meta\_port = 9005
+
+internal\_data\_port = 40012
+
+***iotdb-engine.properties***
+
+rpc\_port=6669
+
+system\_dir=node2/system
+data\_dirs=node2/data
+wal\_dir=node2/wal
+index\_root\_dir=node2/index
+udf\_root\_dir=node2/ext/udf
+tracing\_dir=node2/tracing
+
+**Node3**:
+
+***iotdb-cluster.properties***
+
+seed\_nodes = 127.0.0.1:9003,127.0.0.1:9005,127.0.0.1:9007
+
+default\_replica\_num = 1
+
+internal\_meta\_port = 9007
+
+internal\_data\_port = 40014
+
+***iotdb-engine.properties***
+
+rpc\_port=6671
+
+system\_dir=node3/system
+data\_dirs=node3/data
+wal\_dir=node3/wal
+index\_root\_dir=node3/index
+udf\_root\_dir=node3/ext/udf
+tracing\_dir=node3/tracing
+
### Compile from source code:
+
```
mvn clean package -DskipTests
chmod -R 777 ./cluster/target/
@@ -65,4 +128,90 @@ nohup ./cluster/target/iotdb-cluster-0.13.0-SNAPSHOT/sbin/start-node.sh ./cluste
nohup ./cluster/target/iotdb-cluster-0.13.0-SNAPSHOT/sbin/start-node.sh ./cluster/target/test-classes/node3conf/ >/dev/null 2>&1 &
```
### Use the official website release version:
-You can refer to the above example, but starting multiple instances on a single machine requires handling port and file directory conflicts.
\ No newline at end of file
+
+Download the release version:
+```
+curl -O https://downloads.apache.org/iotdb/0.12.1/apache-iotdb-0.12.1-cluster-bin.zip
+```
+
+Unzip the package:
+
+```
+unzip apache-iotdb-0.12.1-cluster-bin.zip
+```
+
+Enter IoTDB cluster root directory:
+
+```
+cd apache-iotdb-0.12.1-cluster-bin
+```
+
+Set default\_replica\_num = 1:
+
+```
+sed -i -e 's/^default_replica_num=3$/default_replica_num=1/g' conf/iotdb-cluster.properties
+```
+
+Create conf\_dir for node2 and node3:
+
+```
+cp -r conf node2_conf
+cp -r conf node3_conf
+```
+
+Handle port and file directory conflicts:
+
+```
+sed -i -e 's/^internal_meta_port=9003$/internal_meta_port=9005/g' -e 's/^internal_data_port=40010$/internal_data_port=40012/g' node2_conf/iotdb-cluster.properties
+sed -i -e 's/^internal_meta_port=9003$/internal_meta_port=9007/g' -e 's/^internal_data_port=40010$/internal_data_port=40014/g' node3_conf/iotdb-cluster.properties
+sed -i -e 's/^rpc_port=6667$/rpc_port=6669/g' -e node2_conf/iotdb-engine.properties
+sed -i -e 's/^rpc_port=6667$/rpc_port=6671/g' -e node3_conf/iotdb-engine.properties
+sed -i -e 's/^# data_dirs=data\/data$/data_dirs=node2\/data/g' -e 's/^# wal_dir=data\/wal$/wal_dir=node2\/wal/g' -e 's/^# tracing_dir=data\/tracing$/tracing_dir=node2\/tracing/g' -e 's/^# system_dir=data\/system$/system_dir=node2\/system/g' -e 's/^# udf_root_dir=ext\/udf$/udf_root_dir=node2\/ext\/udf/g' -e 's/^# index_root_dir=data\/index$/index_root_dir=node2\/index/g' node2_conf/iotdb-engine.properties
+sed -i -e 's/^# data_dirs=data\/data$/data_dirs=node3\/data/g' -e 's/^# wal_dir=data\/wal$/wal_dir=node3\/wal/g' -e 's/^# tracing_dir=data\/tracing$/tracing_dir=node3\/tracing/g' -e 's/^# system_dir=data\/system$/system_dir=node3\/system/g' -e 's/^# udf_root_dir=ext\/udf$/udf_root_dir=node3\/ext\/udf/g' -e 's/^# index_root_dir=data\/index$/index_root_dir=node3\/index/g' node3_conf/iotdb-engine.properties
+```
+
+**You can modify the configuration items by yourself instead of using "sed" command**
+
+Start the three nodes with their configurations:
+
+
+```
+nohup ./sbin/start-node.sh >/dev/null 2>&1 &
+nohup ./sbin/start-node.sh ./node2_conf/ >/dev/null 2>&1 &
+nohup ./sbin/start-node.sh ./node3_conf/ >/dev/null 2>&1 &
+```
+
+
+
+## Example of distributed configurations for 3 nodes and 3 replicas
+
+Suppose we need to deploy the distributed IoTDB on three physical nodes, A, B, and C, whose public network IP is *A\_public\_IP*, *B\_public\_IP*, and *C\_public\_IP*, and private network IP is *A\_private\_IP*, *B\_private\_IP*, and *C\_private\_IP*.
+Note: If there is no public network IP or private network IP, both can be set to the same, just need to ensure that the client can access the server.
+
+### Configurations
+
+**Each Node:**
+
+***iotdb-cluster.properties***
+
+seed\_nodes = *A\_private\_Ip*:9003,*B\_private\_Ip*:9003,*C\_private\_Ip*:9003
+
+default\_replica\_num = 3
+
+internal\_ip = *A\_private\_Ip* (or *B\_private\_Ip*, *C\_private\_Ip*)
+
+***iotdb-enginer.properties***
+
+rpc\_address = *A\_public\_Ip* (or *B\_private\_Ip*, *C\_public\_Ip*)
+
+### Start IoTDB cluster
+
+The operation steps are as follows:
+
+* Use 'mvn clean package -pl cluster -am -DskipTests' to compile the distributed module or directly go into the [website](https://iotdb.apache.org/Download/) to download the latest version.
+* Make sure ports 6567, 6667, 9003, 9004, 40010, 40011 and 31999 are open on all three nodes.
+
+* Send the package to all servers.
+
+* Modify the configuration items.
+* Run sh sbin/start-node.sh on each of the three nodes (or run in the background).
diff --git a/docs/UserGuide/Cluster/Cluster-Setup.md b/docs/UserGuide/Cluster/Cluster-Setup.md
index 334ba08..134761a 100644
--- a/docs/UserGuide/Cluster/Cluster-Setup.md
+++ b/docs/UserGuide/Cluster/Cluster-Setup.md
@@ -19,268 +19,359 @@
-->
-# Cluster Setup
-For installation prerequisites, please refer to [QuickStart](../QuickStart/QuickStart.md)
+## Cluster setup
+
+You can follow this document to start an IoTDB cluster.
+
+## Prerequisite
+To use IoTDB, you need to have:
+
+1. Java >= 1.8 (Please make sure the environment path has been set)
+
+2. Set the max open files num as 65535 to avoid "too many open files" problem.
+
+
+
+## Installation
+
+IoTDB provides you three installation methods, you can refer to the following suggestions, choose one of them:
+
+- Installation from source code. If you need to modify the code yourself, you can use this method.
+- Installation from binary files. Download the binary files from the official website.
+- Using Docker:The path to the dockerfile is https://github.com/apache/iotdb/blob/master/docker/src/main
+
+### Build from source
+
+You can download the source code from:
+
+```
+git clone https://github.com/apache/iotdb.git
+```
+
+The default dev branch is the master branch, If you want to use a released version, for example:
+
+```
+git checkout rel/0.12
+```
+
+Under the root path of iotdb:
+
+```
+> mvn clean package -pl cluster -am -DskipTests
+```
+
+Then the cluster binary version can be found at **cluster/target/{iotdb-project.version}**
+
+### Download
+
+You can download the binary file from: [Download Page](https://iotdb.apache.org/Download/)
+
+
+
+## Directory
+
+After installation, the following directories will be generated by default under the root directory of the iotdb cluster:
+
+| Directory | **Description** |
+| --------- | ------------------------------------------------------------ |
+| conf | Configuration file directory |
+| data | Default data file directory, which can be modified in the configuration file |
+| ext | Default udf directory, which can be modified in the configuration file |
+| lib | Library directory |
+| logs | Execution log directory |
+| sbin | Script directory |
+| tools | System tool directory |
+
+
+
+## Configurations
+
+Before starting to use IoTDB, you need to config the configuration files first. For your convenience, we have already set the default config in the files.
+
+In total, we provide users four kinds of configurations module:
+
+- environment configuration file (`iotdb-env.bat`, `iotdb-env.sh`). The default configuration file for the environment configuration item. Users can configure the relevant system configuration items of JAVA-JVM in the file.
+- system configuration file (`iotdb-engine.properties`). The default configuration file for the IoTDB engine layer configuration item. Users can configure the IoTDB engine related parameters in the file, such as the precision of timestamp(`timestamp_precision`), etc. What's more, Users can configure settings of TsFile (the data files), such as the data size written to the disk per time(`group_size_in_byte`).
+- log configuration file (`logback.xml`). The default log configuration file, such as the log levels.
+- `iotdb-cluster.properties`. Some configurations required by IoTDB cluster. Such as replication number(`default_replica_num`), etc.
+
+For detailed description of the two configuration files `iotdb-engine.properties`, `iotdb-env.sh`/`iotdb-env.bat`, please refer to [Configuration Manual](https://github.com/apache/iotdb/blob/master/docs/UserGuide/Appendix/Config-Manual.md). The configuration items of IoTDB cluster are in the `iotdb-cluster.properties` file, you can also review the comments in the [configuration file](https://github.com/apache/iotdb/blob/master/cluster/src/assembly/resources/conf/iotdb-cluster.properties) [...]
+
+Configuration files are located at **{cluster\_root\_dir}/conf**
+
+**You are necessary to modify the following configuration items of each node to start your IoTDB cluster**:
+
+* iotdb-engine.properties:
+
+ * rpc\_address
+
+ - rpc\_port
+
+ - base\_dir
+
+ - data\_dirs
+
+ - wal\_dir
+
+* iotdb-cluster.properties
+ * internal\_ip
+ * internal\_meta\_port
+ * internal\_data\_port
+ * cluster\_info\_public\_port
+ * seed\_nodes
+
+ * default\_replica\_num
+
+### OverWrite the configurations of Stand-alone node
+
+Some configurations in the iotdb-engines.properties will be ignored
+
+- `enable_auto_create_schema` is always considered as `false`. Use `enable_auto_create_schema` in iotdb-cluster.properties to enable it, instead.
+
+- `is_sync_enable` is always considered as `false`.
+
+
+
## Start Service
-You can deploy a distributed cluster on multiple nodes or on a single machine, the main difference being that the latter needs to handle conflicts between ports and file directories.
-For detail descriptions, please refer to [Cluster Configuration Items](#Cluster Configuration Items).
+
+### Start Cluster
+
+You can deploy a distributed cluster on multiple nodes or on a single machine, the main difference being that the latter needs to handle conflicts between ports and file directories. For detail descriptions, please refer to [Configurations](#Configurations).
To start the service of one of the nodes, you need to execute the following commands:
-```bash
+```
# Unix/OS X
> nohup sbin/start-node.sh [printgc] [<conf_path>] >/dev/null 2>&1 &
# Windows
> sbin\start-node.bat [printgc] [<conf_path>]
```
-`printgc` means whether enable the gc and print gc logs when start the node,
-`<conf_path>` use the configuration file in the `conf_path` folder to override the default configuration file.
-## OverWrite the configurations of Stand-alone node
+`printgc` means whether enable the gc and print gc logs when start the node,
+ `<conf_path>` use the configuration file in the `conf_path` folder to override the default configuration file.
-Some configurations in the iotdb-engines.properties will be ignored
+**If you start all the seed nodes, and all the seed nodes can contact each other without ip/port and file directory conflicts, the cluster has successfully started.**
-* `enable_auto_create_schema` is always considered as `false`. Use `enable_auto_create_schema` in
- iotdb-cluster.properties to enable it, instead.
+### Cluster scalability
-* `is_sync_enable` is always considered as `false`.
+In the process of cluster running, users can add new nodes to the cluster or delete existing nodes. At present, it only supports node by node cluster scalability, and multi node cluster scalability can be transformed into a series of single node cluster scalability operations. The cluster will hanlde new cluster extension operations only after the last cluster scalability operation is completed.
-## Cluster scalability
-In the process of cluster running, users can add new nodes to the cluster or delete existing nodes.
-At present, it only supports node by node cluster scalability, and multi node cluster scalability can be
-transformed into a series of single node cluster scalability operations. The cluster will hanlde new
-cluster extension operations only after the last cluster scalability operation is completed.
+**Start the following script on the new node to join the cluster to add a new node:**
-### add node
-Start the following script on the new node to join the cluster to add a new node:
-```bash
+```
# Unix/OS X
> nohup sbin/add-node.sh [printgc] [<conf_path>] >/dev/null 2>&1 &
-
+;
# Windows
> sbin\add-node.bat [printgc] [<conf_path>]
```
-`printgc` means whether enable the gc and print gc logs when start the node,
-`<conf_path>` use the configuration file in the `conf_path` folder to override the default configuration file.
-### remove node
-Start the following script on any node in the cluster to delete a node:
-```bash
+`printgc` means whether enable the gc and print gc logs when start the node,
+ `<conf_path>` use the configuration file in the `conf_path` folder to override the default configuration file. GC log is off by default. For performance tuning, you may want to collect the GC info. GC log is stored at `IOTDB_HOME/logs/gc.log`.
+
+**Start the following script on any node in the cluster to delete a node:**
+
+```
# Unix/OS X
> sbin/remove-node.sh <internal_ip> <internal_meta_port>
# Windows
> sbin\remove-node.bat <internal_ip> <internal_meta_port>
```
-`internal_ip` means the IP address of the node to be deleted
-`internal_meta_port` means the meta port of the node to be deleted
-
-## Cluster Configuration Items
-Before starting to use IoTDB, you need to config the configuration files first.
-For your convenience, we have already set the default config in the files.
-In total, we provide users four kinds of configurations module:
+`internal_ip` means the IP address of the node to be deleted `internal_meta_port` means the meta port of the node to be deleted
-* environment configuration file (`iotdb-env.bat`, `iotdb-env.sh`).
-The default configuration file for the environment configuration item.
-Users can configure the relevant system configuration items of JAVA-JVM in the file.
-
-* system configuration file (`iotdb-engine.properties`). The default configuration file for the IoTDB engine layer configuration item.
-Users can configure the IoTDB engine related parameters in the file, such as the precision of timestamp(`timestamp_precision`), etc.
-What's more, Users can configure settings of TsFile (the data files), such as the data size written to the disk per time(`group_size_in_byte`).
+### Use Cli
-* log configuration file (`logback.xml`). The default log configuration file, such as the log levels.
+please refer to [QuickStart](https://github.com/apache/iotdb/blob/master/docs/UserGuide/QuickStart/QuickStart.md). You can establish a connection with any node in the cluster according to the rpc\_address and rpc\_port.
-* `iotdb-cluster.properties`. Some configurations required by IoTDB cluster. Such as replication number(`default_replica_num`), etc.
-
-For detailed description of the two configuration files `iotdb-engine.properties`, `iotdb-env.sh`/`iotdb-env.bat`, please refer to [Configuration Manual](../Appendix/Config-Manual.md).
-The configuration items described below are in the `iotdb-cluster.properties` file, you can also review the comments in the [configuration file](https://github.com/apache/iotdb/blob/master/cluster/src/assembly/resources/conf/iotdb-cluster.properties) directly.
-
-* internal\_ip
+### **Stop Cluster**
-|Name|internal\_ip|
-|:---:|:---|
-|Description|IP address of internal communication between nodes in IOTDB cluster, such as heartbeat, snapshot, raft log, etc|
-|Type|String|
-|Default|127.0.0.1|
-|Effective| After restart system, shall NOT change after cluster is up|
-
-* internal\_meta\_port
+To stop the services of all the nodes on a single machine, you need to execute the following commands:
-|Name|internal\_meta\_port|
-|:---:|:---|
-|Description|IoTDB meta service port, for meta group's communication, which involves all nodes and manages the cluster configuration and storage groups. **IoTDB will automatically create a heartbeat port for each meta service. The default meta service heartbeat port is `internal_meta_port+1`, please confirm that these two ports are not reserved by the system and are not occupied**|
-|Type|Int32|
-|Default|9003|
-|Effective| After restart system, shall NOT change after cluster is up|
-
-* internal\_data\_port
-
-|Name|internal\_data\_port|
-|:---:|:---|
-|Description|IoTDB data service port, for data groups' communication, each consists of one node and its replicas, managing timeseries schemas and data. **IoTDB will automatically create a heartbeat port for each data service. The default data service heartbeat port is `internal_data_port+1`. Please confirm that these two ports are not reserved by the system and are not occupied**|
-|Type|Int32|
-|Default|40010|
-|Effective| After restart system, shall NOT change after cluster is up|
-
-* cluster\_info\_public\_port
-
-|Name|cluster\_info\_public\_port|
-|:---:|:---|
-|Description|The port of RPC service that getting the cluster info (e.g., data partition)|
-|Type|Int32|
-|Default|6567|
-|Effective| After restart system|
-
-* open\_server\_rpc\_port
-
-|Name|open\_server\_rpc\_port|
-|:---:|:---|
-|Description|whether open port for server module (for debug purpose), if true, the single's server rpc_port will be changed to `rpc_port (in iotdb-engines.properties) + 1`|
-|Type|Boolean|
-|Default|False|
-|Effective| After restart system|
-
-* seed\_nodes
-
-|Name|seed\_nodes|
-|:---:|:---|
-|Description|The address of the nodes in the cluster, `{IP/DOMAIN}:internal_meta_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 cluster, so every node that use `start-node.sh [...]
-|Type|String|
-|Default|127.0.0.1:9003,127.0.0.1:9005,127.0.0.1:9007|
-|Effective| After restart system|
-
-* rpc\_thrift\_compression\_enable
-
-|Name|rpc\_thrift\_compression\_enable|
-|:---:|:---|
-|Description|Whether to enable thrift compression, **Note that this parameter should be consistent with each node and with the client, and also consistent with the `rpc_thrift_compression_enable` parameter in `iotdb-engine.properties`**|
-|Type| Boolean|
-|Default|false|
-|Effective| After restart system, must be changed with all other nodes|
-
-* default\_replica\_num
-
-|Name|default\_replica\_num|
-|:---:|:---|
-|Description|Number of cluster replicas of timeseries schema and data. Storage group info is always fully replicated in all nodes.|
-|Type|Int32|
-|Default|3|
-|Effective| After restart system, shall NOT change after cluster is up|
-
-* multi\_raft\_factor
-
-|Name|multi\_raft\_factor|
-|:---:|:---|
-|Description|Number of raft group instances started by each data group. By default, each data group starts one raft group|
-|Type|Int32|
-|Default|1|
-|Effective| After restart system, shall NOT change after cluster is up|
-
-* cluster\_name
-
-|Name|cluster\_name|
-|:---:|:---|
-|Description|Cluster name is used to identify different clusters, **`cluster_name` of all nodes in a cluster must be the same**|
-|Type|String|
-|Default|default|
-|Effective| After restart system|
-
-* connection\_timeout\_ms
-
-|Name|connection\_timeout\_ms|
-|:---:|:---|
-|Description|Heartbeat timeout time period between nodes in the same raft group, in milliseconds|
-|Type|Int32|
-|Default|20000|
-|Effective| After restart system|
-
-* read\_operation\_timeout\_ms
-
-|Name|read\_operation\_timeout\_ms|
-|:---:|:---|
-|Description|Read operation timeout time period, for internal communication only, not for the entire operation, in milliseconds|
-|Type|Int32|
-|Default|30000|
-|Effective| After restart system|
-
-* write\_operation\_timeout\_ms
-
-|Name|write\_operation\_timeout\_ms|
-|:---:|:---|
-|Description|The write operation timeout period, for internal communication only, not for the entire operation, in milliseconds|
-|Type|Int32|
-|Default|30000|
-|Effective| After restart system|
-
-* min\_num\_of\_logs\_in\_mem
-
-|Name|min\_num\_of\_logs\_in\_mem|
-|:---:|:---|
-|Description|The minimum number of committed logs in memory, after each log deletion, at most such number of logs will remain in memory. Increasing the number will reduce the chance to use snapshot in catch-ups, but will also increase the memory footprint|
-|Type|Int32|
-|Default|100|
-|Effective| After restart system|
-
-* max\_num\_of\_logs\_in\_mem
-
-|Name|max\_num\_of\_logs\_in\_mem|
-|:---:|:---|
-|Description|Maximum number of committed logs in memory, when reached, a log deletion will be triggered. Increasing the number will reduce the chance to use snapshot in catch-ups, but will also increase memory footprint|
-|Type|Int32|
-|Default|1000|
-|Effective| After restart system|
-
-* log\_deletion\_check\_interval\_second
-
-|Name|log\_deletion\_check\_interval\_second|
-|:---:|:---|
-|Description|The interval for checking and deleting the committed log task, which removes oldest in-memory committed logs when their size exceeds `min\_num\_of\_logs\_in\_mem` , in seconds|
-|Type|Int32|
-|Default|60|
-|Effective| After restart system|
-
-* enable\_auto\_create\_schema
-
-|Name|enable\_auto\_create\_schema|
-|:---:|:---|
-|Description|Whether creating schema automatically is enabled, this will replace the one in `iotdb-engine.properties`|
-|Type|BOOLEAN|
-|Default|true|
-|Effective| After restart system|
-
-* consistency\_level
-
-|Name|consistency\_level|
-|:---:|:---|
-|Description|Consistency level, now three consistency levels are supported: strong, mid, and weak. Strong consistency means the server will first try to synchronize with the leader to get the newest data, if failed(timeout), directly report an error to the user; While mid consistency means the server will first try to synchronize with the leader, but if failed(timeout), it will give up and just use current data it has cached before; Weak consistency does not synchronize with the leader a [...]
-|Type|strong, mid, weak|
-|Default|mid|
-|Effective| After restart system|
-
-* is\_enable\_raft\_log\_persistence
-
-|Name|is\_enable\_raft\_log\_persistence|
-|:---:|:---|
-|Description|Whether to enable raft log persistence|
-|Type|BOOLEAN|
-|Default|true|
-|Effective| After restart system|
-
-## Enable GC log
-GC log is off by default.
-For performance tuning, you may want to collect the GC info.
-
-To enable GC log, just add a parameter `printgc` when you start the server.
-
-```bash
-nohup sbin/start-node.sh printgc >/dev/null 2>&1 &
```
-Or
-```bash
-sbin\start-node.bat printgc
+# Unix/OS X
+> sbin/stop-node.sh
+
+# Windows
+> sbin\stop-node.bat
```
-GC log is stored at `IOTDB_HOME/logs/gc.log`.
+
+
+## Appendix
+
+### Cluster Configuration
+
+- internal\_ip
+
+| Name | internal\_ip |
+| ----------- | ------------------------------------------------------------ |
+| Description | IP address of internal communication between nodes in IOTDB cluster, such as heartbeat, snapshot, raft log, etc |
+| Type | String |
+| Default | 127.0.0.1 |
+| Effective | After restart system, shall NOT change after cluster is up |
+
+- internal\_meta\_port
+
+| Name | internal\_meta\_port |
+| ----------- | ------------------------------------------------------------ |
+| Description | IoTDB meta service port, for meta group's communication, which involves all nodes and manages the cluster configuration and storage groups. **IoTDB will automatically create a heartbeat port for each meta service. The default meta service heartbeat port is `internal_meta_port+1`, please confirm that these two ports are not reserved by the system and are not occupied** |
+| Type | Int32 |
+| Default | 9003 |
+| Effective | After restart system, shall NOT change after cluster is up |
+
+- internal\_data\_port
+
+| Name | internal\_data\_port |
+| ----------- | ------------------------------------------------------------ |
+| Description | IoTDB data service port, for data groups' communication, each consists of one node and its replicas, managing timeseries schemas and data. **IoTDB will automatically create a heartbeat port for each data service. The default data service heartbeat port is `internal_data_port+1`. Please confirm that these two ports are not reserved by the system and are not occupied** |
+| Type | Int32 |
+| Default | 40010 |
+| Effective | After restart system, shall NOT change after cluster is up |
+
+- cluster\_info\_public\_port
+
+| Name | cluster\_info\_public\_port |
+| ----------- | ------------------------------------------------------------ |
+| Description | The port of RPC service that getting the cluster info (e.g., data partition) |
+| Type | Int32 |
+| Default | 6567 |
+| Effective | After restart system |
+
+- open\_server\_rpc\_port
+
+| Name | open\_server\_rpc\_port |
+| ----------- | ------------------------------------------------------------ |
+| Description | whether open port for server module (for debug purpose), if true, the single's server rpc\_port will be changed to `rpc_port (in iotdb-engines.properties) + 1` |
+| Type | Boolean |
+| Default | False |
+| Effective | After restart system |
+
+- seed\_nodes
+
+| Name | seed\_nodes |
+| ----------- | ------------------------------------------------------------ |
+| Description | The address of the nodes in the cluster, `{IP/DOMAIN}:internal_meta_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 cluster, so every node that use `start-node [...]
+| Type | String |
+| Default | 127.0.0.1:9003,127.0.0.1:9005,127.0.0.1:9007 |
+| Effective | After restart system |
+
+- rpc\_thrift\_compression\_enable
+
+| Name | rpc\_thrift\_compression\_enable |
+| ----------- | ------------------------------------------------------------ |
+| Description | Whether to enable thrift compression, **Note that this parameter should be consistent with each node and with the client, and also consistent with the `rpc_thrift_compression_enable` parameter in `iotdb-engine.properties`** |
+| Type | Boolean |
+| Default | false |
+| Effective | After restart system, must be changed with all other nodes |
+
+- default\_replica\_num
+
+| Name | default\_replica\_num |
+| ----------- | ------------------------------------------------------------ |
+| Description | Number of cluster replicas of timeseries schema and data. Storage group info is always fully replicated in all nodes. |
+| Type | Int32 |
+| Default | 3 |
+| Effective | After restart system, shall NOT change after cluster is up |
+
+- multi\_raft\_factor
+
+| Name | multi\_raft\_factor |
+| ----------- | ------------------------------------------------------------ |
+| Description | Number of raft group instances started by each data group. By default, each data group starts one raft group |
+| Type | Int32 |
+| Default | 1 |
+| Effective | After restart system, shall NOT change after cluster is up |
+
+- cluster\_name
+
+| Name | cluster\_name |
+| ----------- | ------------------------------------------------------------ |
+| Description | Cluster name is used to identify different clusters, **`cluster_name` of all nodes in a cluster must be the same** |
+| Type | String |
+| Default | default |
+| Effective | After restart system |
+
+- connection\_timeout\_ms
+
+| Name | connection\_timeout\_ms |
+| ----------- | ------------------------------------------------------------ |
+| Description | Heartbeat timeout time period between nodes in the same raft group, in milliseconds |
+| Type | Int32 |
+| Default | 20000 |
+| Effective | After restart system |
+
+- read\_operation\_timeout\_ms
+
+| Name | read\_operation\_timeout\_ms |
+| ----------- | ------------------------------------------------------------ |
+| Description | Read operation timeout time period, for internal communication only, not for the entire operation, in milliseconds |
+| Type | Int32 |
+| Default | 30000 |
+| Effective | After restart system |
+
+- write\_operation\_timeout\_ms
+
+| Name | write\_operation\_timeout\_ms |
+| ----------- | ------------------------------------------------------------ |
+| Description | The write operation timeout period, for internal communication only, not for the entire operation, in milliseconds |
+| Type | Int32 |
+| Default | 30000 |
+| Effective | After restart system |
+
+- min\_num\_of\_logs\_in\_mem
+
+| Name | min\_num\_of\_logs\_in\_mem |
+| ----------- | ------------------------------------------------------------ |
+| Description | The minimum number of committed logs in memory, after each log deletion, at most such number of logs will remain in memory. Increasing the number will reduce the chance to use snapshot in catch-ups, but will also increase the memory footprint |
+| Type | Int32 |
+| Default | 100 |
+| Effective | After restart system |
+
+- max\_num\_of\_logs\_in\_mem
+
+| Name | max\_num\_of\_logs\_in\_mem |
+| ----------- | ------------------------------------------------------------ |
+| Description | Maximum number of committed logs in memory, when reached, a log deletion will be triggered. Increasing the number will reduce the chance to use snapshot in catch-ups, but will also increase memory footprint |
+| Type | Int32 |
+| Default | 1000 |
+| Effective | After restart system |
+
+- log\_deletion\_check\_interval\_second
+
+| Name | log\_deletion\_check\_interval\_second |
+| ----------- | ------------------------------------------------------------ |
+| Description | The interval for checking and deleting the committed log task, which removes oldest in-memory committed logs when their size exceeds `min_num_of_logs_in_mem` , in seconds |
+| Type | Int32 |
+| Default | 60 |
+| Effective | After restart system |
+
+- enable\_auto\_create\_schema
+
+| Name | enable\_auto\_create\_schema |
+| ----------- | ------------------------------------------------------------ |
+| Description | Whether creating schema automatically is enabled, this will replace the one in `iotdb-engine.properties` |
+| Type | BOOLEAN |
+| Default | true |
+| Effective | After restart system |
+
+- consistency\_level
+
+| Name | consistency\_level |
+| ----------- | ------------------------------------------------------------ |
+| Description | Consistency level, now three consistency levels are supported: strong, mid, and weak. Strong consistency means the server will first try to synchronize with the leader to get the newest data, if failed(timeout), directly report an error to the user; While mid consistency means the server will first try to synchronize with the leader, but if failed(timeout), it will give up and just use current data it has cached before; Weak consistency does not synchronize with the [...]
+| Type | strong, mid, weak |
+| Default | mid |
+| Effective | After restart system |
+
+- is\_enable\_raft\_log\_persistence
+
+| Name | is\_enable\_raft\_log\_persistence |
+| ----------- | -------------------------------------- |
+| Description | Whether to enable raft log persistence |
+| Type | BOOLEAN |
+| Default | true |
+| Effective | After restart system |
diff --git a/docs/zh/UserGuide/Cluster/Cluster-Setup-Example.md b/docs/zh/UserGuide/Cluster/Cluster-Setup-Example.md
index d94778b..92adb4e 100644
--- a/docs/zh/UserGuide/Cluster/Cluster-Setup-Example.md
+++ b/docs/zh/UserGuide/Cluster/Cluster-Setup-Example.md
@@ -1,61 +1,128 @@
<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
+```
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
--->
+ http://www.apache.org/licenses/LICENSE-2.0
-## 前提条件
-如果您在使用 Windows 系统,请安装 MinGW,WSL 或者 git bash。
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+```
-## 3 节点 3 副本分布式搭建示例
+-->
-假设我们需要在三个物理节点上部署分布式 IoTDB,这三个节点分别为 A, B 和 C,其公网 ip 分别为 A_public_ip,B_public_ip 和 C_public_ip,私网 ip 分别为 A_private_ip,B_private_ip 和 C_private_ip。
-注:如果没有公网 ip 或者私网 ip 则两者设置成一致即可,只需要保证客户端能够访问到服务端即可。
+## 前提条件
-以下为操作步骤:
-1. 使用 `mvn clean package -pl cluster -am -DskipTests` 编译分布式模块或直接到 [官网](https://iotdb.apache.org/Download/) 下载最新版本。
-2. 保证三个节点的 6567, 6667, 9003, 9004, 40010, 40011 和 31999 端口是开放的。
-3. 将包上传到所有的服务器上。
-4. 配置所有节点 conf/iotdb-cluster.properties 配置文件中的 seed_nodes 为 "A_private_ip:9003,B_private_ip:9003,C_private_ip:9003"
-5. 配置所有节点 conf/iotdb-cluster.properties 配置文件中的 internal_ip 为各自节点的 private_ip。
-6. 配置所有节点 conf/iotdb-cluster.properties 配置文件中的 default_replica_num 为 3。
-7. 配置所有节点 conf/iotdb-engine.properties 配置文件中的 rpc_address 为各自节点的 public_ip。
-8. 在 3 个节点上分别运行 sh sbin/start-node.sh 即可(后台运行也可)。
+如果您在使用 Windows 系统,请安装 MinGW,WSL 或者 git bash。
## 1 节点 1 副本分布式搭建示例
+
### 源码编译:
+
```
mvn clean package -DskipTests
chmod -R 777 ./cluster/target/
nohup ./cluster/target/iotdb-cluster-0.13.0-SNAPSHOT/sbin/start-node.sh >/dev/null 2>&1 &
```
+
### 使用官网发布版本:
+
```
-curl -O https://mirrors.bfsu.edu.cn/apache/iotdb/0.12.0/apache-iotdb-0.12.0-cluster-bin.zip
-unzip apache-iotdb-0.12.0-cluster-bin.zip
-cd apache-iotdb-0.12.0-cluster-bin
+curl -O https://downloads.apache.org/iotdb/0.12.1/apache-iotdb-0.12.1-cluster-bin.zip
+unzip apache-iotdb-0.12.1-cluster-bin.zip
+cd apache-iotdb-0.12.1-cluster-bin
sed -i -e 's/^seed_nodes=127.0.0.1:9003,127.0.0.1:9005,127.0.0.1:9007$/seed_nodes=127.0.0.1:9003/g' conf/iotdb-cluster.properties
sed -i -e 's/^default_replica_num=3$/default_replica_num=1/g' conf/iotdb-cluster.properties
nohup ./sbin/start-node.sh >/dev/null 2>&1 &
```
## 单机部署 3 节点 1 副本示例
+
+### 配置
+
+通过自己修改配置来处理端口和文件目录冲突,可以在一台机器上启动多个实例。
+
+**节点1**:**(默认)**
+
+***iotdb-cluster.properties***
+
+seed\_nodes = 127.0.0.1:9003,127.0.0.1:9005,127.0.0.1:9007
+
+default\_replica\_num = 1
+
+internal\_meta\_port = 9003
+
+internal\_data\_port = 40010
+
+***iotdb-engine.properties***
+
+rpc\_port=6667
+
+system\_dir=data/system
+data\_dirs=data/data
+wal\_dir=data/wal
+index\_root\_dir=data/index
+udf\_root\_dir=ext/udf
+tracing\_dir=data/tracing
+
+**节点2**:
+
+***iotdb-cluster.properties***
+
+seed\_nodes = 127.0.0.1:9003,127.0.0.1:9005,127.0.0.1:9007
+
+default\_replica\_num = 1
+
+internal\_meta\_port = 9005
+
+internal\_data\_port = 40012
+
+***iotdb-engine.properties***
+
+rpc\_port=6669
+
+system\_dir=node2/system
+data\_dirs=node2/data
+wal\_dir=node2/wal
+index\_root\_dir=node2/index
+udf\_root\_dir=node2/ext/udf
+tracing\_dir=node2/tracing
+
+**节点3**:
+
+***iotdb-cluster.properties***
+
+seed\_nodes = 127.0.0.1:9003,127.0.0.1:9005,127.0.0.1:9007
+
+default\_replica\_num = 1
+
+internal\_meta\_port = 9007
+
+internal\_data\_port = 40014
+
+***iotdb-engine.properties***
+
+rpc\_port=6671
+
+system\_dir=node3/system
+data\_dirs=node3/data
+wal\_dir=node3/wal
+index\_root\_dir=node3/index
+udf\_root\_dir=node3/ext/udf
+tracing\_dir=node3/tracing
+
### 源码编译:
+
```
mvn clean package -DskipTests
chmod -R 777 ./cluster/target/
@@ -63,5 +130,91 @@ nohup ./cluster/target/iotdb-cluster-0.13.0-SNAPSHOT/sbin/start-node.sh ./cluste
nohup ./cluster/target/iotdb-cluster-0.13.0-SNAPSHOT/sbin/start-node.sh ./cluster/target/test-classes/node2conf/ >/dev/null 2>&1 &
nohup ./cluster/target/iotdb-cluster-0.13.0-SNAPSHOT/sbin/start-node.sh ./cluster/target/test-classes/node3conf/ >/dev/null 2>&1 &
```
-### 使用官网发布版本:
-可以参考以上示例,不过在单机启动多个实例时需要处理好端口和文件目录的冲突。
\ No newline at end of file
+
+### 使用官网发布版本:
+
+下载发布版本:
+
+```
+curl -O https://downloads.apache.org/iotdb/0.12.1/apache-iotdb-0.12.1-cluster-bin.zip
+```
+
+解压压缩包:
+
+```
+unzip apache-iotdb-0.12.1-cluster-bin.zip
+```
+
+进入IoTDB集群根目录:
+
+```
+cd apache-iotdb-0.12.1-cluster-bin
+```
+
+设置 default\_replica\_num = 1:
+
+```
+sed -i -e 's/^default_replica_num=3$/default_replica_num=1/g' conf/iotdb-cluster.properties
+```
+
+为节点2,节点3创建conf\_dir:
+
+```
+cp -r conf node2_confcp -r conf node3_conf
+```
+
+解决端口和文件目录冲突:
+
+```
+sed -i -e 's/^internal_meta_port=9003$/internal_meta_port=9005/g' -e 's/^internal_data_port=40010$/internal_data_port=40012/g' node2_conf/iotdb-cluster.properties
+sed -i -e 's/^internal_meta_port=9003$/internal_meta_port=9007/g' -e 's/^internal_data_port=40010$/internal_data_port=40014/g' node3_conf/iotdb-cluster.properties
+sed -i -e 's/^rpc_port=6667$/rpc_port=6669/g' -e node2_conf/iotdb-engine.properties
+sed -i -e 's/^rpc_port=6667$/rpc_port=6671/g' -e node3_conf/iotdb-engine.properties
+sed -i -e 's/^# data_dirs=data\/data$/data_dirs=node2\/data/g' -e 's/^# wal_dir=data\/wal$/wal_dir=node2\/wal/g' -e 's/^# tracing_dir=data\/tracing$/tracing_dir=node2\/tracing/g' -e 's/^# system_dir=data\/system$/system_dir=node2\/system/g' -e 's/^# udf_root_dir=ext\/udf$/udf_root_dir=node2\/ext\/udf/g' -e 's/^# index_root_dir=data\/index$/index_root_dir=node2\/index/g' node2_conf/iotdb-engine.properties
+sed -i -e 's/^# data_dirs=data\/data$/data_dirs=node3\/data/g' -e 's/^# wal_dir=data\/wal$/wal_dir=node3\/wal/g' -e 's/^# tracing_dir=data\/tracing$/tracing_dir=node3\/tracing/g' -e 's/^# system_dir=data\/system$/system_dir=node3\/system/g' -e 's/^# udf_root_dir=ext\/udf$/udf_root_dir=node3\/ext\/udf/g' -e 's/^# index_root_dir=data\/index$/index_root_dir=node3\/index/g' node3_conf/iotdb-engine.properties
+```
+
+**你可以自己修改配置项而不使用“sed”命令**
+
+根据配置文件路径启动三个节点:
+
+
+```
+nohup ./sbin/start-node.sh >/dev/null 2>&1 &nohup ./sbin/start-node.sh ./node2_conf/ >/dev/null 2>&1 &nohup ./sbin/start-node.sh ./node3_conf/ >/dev/null 2>&1 &
+```
+
+
+
+## 3 节点 3 副本分布式搭建示例
+
+假设我们需要在三个物理节点上部署分布式 IoTDB,这三个节点分别为 A, B 和 C,其公网 ip 分别为 A\_public\_IP*, *B\_public\_IP*, and *C\_public\_IP*,私网 ip 分别为 *A\_private\_IP*, *B\_private\_IP*, and *C\_private\_IP*.
+注:如果没有公网 ip 或者私网 ip 则两者设置成一致即可,只需要保证客户端能够访问到服务端即可。
+
+### 配置
+
+**各个节点:**
+
+***iotdb-cluster.properties***
+
+seed\_nodes = *A\_private\_Ip*:9003,*B\_private\_Ip*:9003,*C\_private\_Ip*:9003
+
+default\_replica\_num = 3
+
+internal\_ip = *A\_private\_Ip* (or *B\_private\_Ip*, *C\_private\_Ip*)
+
+***iotdb-enginer.properties***
+
+rpc\_address = *A\_public\_Ip* (or *B\_private\_Ip*, *C\_public\_Ip*)
+
+### 启动IoTDB集群
+
+以下为操作步骤:
+
+* 使用 `mvn clean package -pl cluster -am -DskipTests` 编译分布式模块或直接到 [官网](https://iotdb.apache.org/Download/) 下载最新版本。
+* 保证三个节点的 6567, 6667, 9003, 9004, 40010, 40011 和 31999 端口是开放的。
+
+* 将包上传到所有的服务器上。
+
+* 修改配置项。
+* 在 3 个节点上分别运行 sh sbin/start-node.sh 即可(后台运行也可)。
+
diff --git a/docs/zh/UserGuide/Cluster/Cluster-Setup.md b/docs/zh/UserGuide/Cluster/Cluster-Setup.md
index cb64161..cc552a6 100644
--- a/docs/zh/UserGuide/Cluster/Cluster-Setup.md
+++ b/docs/zh/UserGuide/Cluster/Cluster-Setup.md
@@ -19,258 +19,355 @@
-->
-# 集群设置
-安装环境请参考 [快速上手/安装环境章节](../QuickStart/QuickStart.md)
-## 集群环境搭建
-您可以多节点部署或单机部署分布式集群,两者的主要区别是后者需要处理端口和文件目录的冲突,配置项含义请参考 [配置项](#配置项)。
-启动其中一个节点的服务,需要执行如下命令:
+## 集群设置
-```bash
+你可以根据此文档启动IoTDB集群。
+
+## 安装环境
+
+为使用IoTDB,你首先需要:
+
+1. 安装前需要保证设备上配有 JDK>=1.8 的运行环境,并配置好 JAVA_HOME 环境变量。
+
+2. 设置最大文件打开数为 65535。
+
+## 安装步骤
+
+IoTDB 支持多种安装途径。用户可以使用三种方式对 IoTDB 进行安装——下载二进制可运行程序、使用源码、使用 docker 镜像。
+
+- 使用源码:您可以从代码仓库下载源码并编译,具体编译方法见下方。
+- 二进制可运行程序:请从 [下载](https://iotdb.apache.org/Download/) 页面下载最新的安装包,解压后即完成安装。
+- 使用 Docker 镜像:dockerfile 文件位于 https://github.com/apache/iotdb/blob/master/docker/src/main
+
+### 源码编译
+
+下载源码:
+
+```
+git clone https://github.com/apache/iotdb.git
+```
+
+默认分支为master分支,你可以切换到其他发布版本,例如:
+
+```
+git checkout rel/0.12
+```
+
+在iotdb根目录下:
+
+```
+> mvn clean package -pl cluster -am -DskipTests
+```
+
+集群的二进制版本在目录 **cluster/target/{iotdb-project.version}**下
+
+### 下载
+
+你可以直接下载二进制版本 [Download Page](https://iotdb.apache.org/Download/)
+
+
+
+## 文件目录
+
+完成IoTDB Cluster安装后,默认会在IoTDB Cluster的根目录下生成下列目录文件:
+
+| **目录** | **说明** |
+| -------- | -------------------------------------------- |
+| conf | 配置文件目录 |
+| data | 默认数据文件目录,可通过修改配置文件修改位置 |
+| ext | 默认udf目录,可通过修改配置文件修改位置 |
+| lib | 库文件目录 |
+| logs | 运行日志目录 |
+| sbin | 可执行文件目录 |
+| tools | 系统工具目录 |
+
+
+
+## 配置
+
+为方便 IoTDB Server 的配置与管理,IoTDB Server 为用户提供三种配置项,使得您可以在启动服务或服务运行时对其进行配置。
+
+三种配置项的配置文件均位于 IoTDB 安装目录:`$IOTDB_HOME/conf`文件夹下,其中涉及 server 配置的共有 4 个文件,分别为:`iotdb-cluster.properties`、`iotdb-engine.properties`、`logback.xml` 和 `iotdb-env.sh`(Unix 系统)/`iotdb-env.bat`(Windows 系统), 您可以通过更改其中的配置项对系统运行的相关配置项进行配置。
+
+配置文件的说明如下:
+
+- `iotdb-env.sh`/`iotdb-env.bat`:环境配置项的默认配置文件。您可以在文件中配置 JAVA-JVM 的相关系统配置项。
+- `iotdb-engine.properties`:IoTDB 引擎层系统配置项的默认配置文件。您可以在文件中配置 IoTDB 引擎运行时的相关参数。此外,用户可以在文件中配置 IoTDB 存储时 TsFile 文件的相关信息,如每次将内存中的数据写入到磁盘前的缓存大小 (`group_size_in_byte`),内存中每个列打一次包的大小 (`page_size_in_byte`) 等。
+- `logback.xml`: 日志配置文件,比如日志级别等。
+- `iotdb-cluster.properties`: IoTDB 集群所需要的一些配置。
+
+`iotdb-engine.properties`、`iotdb-env.sh`/`iotdb-env.bat` 两个配置文件详细说明请参考 [附录/配置手册](https://github.com/apache/iotdb/blob/master/docs/zh/UserGuide/Appendix/Config-Manual.md),与集群有关的配置项是在`iotdb-cluster.properties`文件中的,你可以直接查看 [配置文件](https://github.com/apache/iotdb/blob/master/cluster/src/assembly/resources/conf/iotdb-cluster.properties) 中的注释,也可以参考 [Cluster Configuration](#集群配置项)。
+
+配置文件位于**{cluster\_root\_dir}/conf**。
+
+**你需要修改每个节点以下的配置项去启动你的IoTDB集群:**
+
+* iotdb-engine.properties:
+
+ * rpc\_address
+
+ - rpc\_port
+
+ - base\_dir
+
+ - data\_dirs
+
+ - wal\_dir
+
+* iotdb-cluster.properties
+ * internal\_ip
+ * internal\_meta\_port
+ * internal\_data\_port
+ * cluster\_info\_public\_port
+ * seed\_nodes
+
+ * default\_replica\_num
+
+## 被覆盖的单机版选项
+
+iotdb-engines.properties 配置文件中的部分内容会不再生效:
+
+- `enable_auto_create_schema` 不再生效,并被视为`false`. 应使用 iotdb-cluster.properties 中的
+ `enable_auto_create_schema` 来控制是否自动创建序列。
+- `is_sync_enable` 不再生效,并被视为 `false`.
+
+
+
+## 启动服务
+
+### 启动集群
+
+您可以多节点部署或单机部署分布式集群,两者的主要区别是后者需要处理端口和文件目录的冲突,配置项含义请参考 [配置项](https://github.com/apache/iotdb/blob/master/docs/zh/UserGuide/Cluster/Cluster-Setup.md#配置项)。 启动其中一个节点的服务,需要执行如下命令:
+
+```
# Unix/OS X
> nohup sbin/start-node.sh [printgc] [<conf_path>] >/dev/null 2>&1 &
# Windows
> sbin\start-node.bat [printgc] [<conf_path>]
```
-`printgc`表示在启动的时候,会开启 GC 日志。
-`<conf_path>`使用`conf_path`文件夹里面的配置文件覆盖默认配置文件。
-## 被覆盖的单机版选项
-
-iotdb-engines.properties 配置文件中的部分内容会不再生效:
+`printgc`表示在启动的时候,会开启 GC 日志。 `<conf_path>`使用`conf_path`文件夹里面的配置文件覆盖默认配置文件。GC 日志默认是关闭的。为了性能调优,用户可能会需要收集 GC 信息。GC 日志会被存储在`IOTDB_HOME/logs/`下面。
-* `enable_auto_create_schema` 不再生效,并被视为`false`. 应使用 iotdb-cluster.properties 中的
-`enable_auto_create_schema` 来控制是否自动创建序列。
+**如果你启动了所有seed节点,并且所有seed节点可以相互通信并没有ip地址/端口和文件目录的冲突,集群就成功启动了。**
-* `is_sync_enable` 不再生效,并被视为 `false`.
+### 集群扩展
-## 集群扩展
在集群运行过程中,用户可以向集群中加入新的节点或者删除集群中已有节点。目前仅支持逐节点集群扩展操作,多节点的集群扩展可以转化为一系列单节点集群扩展操作来实现。集群只有在上一次集群扩展操作完成后才会接收新的集群扩展操作。
-### 增加节点
-在要加入集群的新节点上启动以下脚本进行增加节点操作:
-```bash
+**在要加入集群的新节点上启动以下脚本进行增加节点操作:**
+
+```
# Unix/OS X
> nohup sbin/add-node.sh [printgc] [<conf_path>] >/dev/null 2>&1 &
# Windows
> sbin\add-node.bat [printgc] [<conf_path>]
```
-`printgc`表示在启动的时候,会开启 GC 日志。
-`<conf_path>`使用`conf_path`文件夹里面的配置文件覆盖默认配置文件。
-### 删除节点
-在任一集群中的节点上启动以下脚本进行删除节点操作:
-```bash
+`printgc`表示在启动的时候,会开启 GC 日志。 `<conf_path>`使用`conf_path`文件夹里面的配置文件覆盖默认配置文件。
+
+**在任一集群中的节点上启动以下脚本进行删除节点操作:**
+
+```
# Unix/OS X
> sbin/remove-node.sh <internal_ip> <internal_meta_port>
# Windows
> sbin\remove-node.bat <internal_ip> <internal_meta_port>
```
-`internal_ip`表示待删除节点的 IP 地址
-`internal_meta_port`表示待删除节点的 meta 服务端口
-## 配置项
+`internal_ip`表示待删除节点的 IP 地址 `internal_meta_port`表示待删除节点的 meta 服务端口
-为方便 IoTDB Server 的配置与管理,IoTDB Server 为用户提供三种配置项,使得您可以在启动服务或服务运行时对其进行配置。
+### 使用 Cli 工具
-三种配置项的配置文件均位于 IoTDB 安装目录:`$IOTDB_HOME/conf`文件夹下,其中涉及 server 配置的共有 4 个文件,分别为:`iotdb-cluster.properties`、`iotdb-engine.properties`、`logback.xml` 和 `iotdb-env.sh`(Unix 系统)/`iotdb-env.bat`(Windows 系统), 您可以通过更改其中的配置项对系统运行的相关配置项进行配置。
+安装环境请参考 [快速上手/安装环境章节](https://github.com/apache/iotdb/blob/master/docs/zh/UserGuide/QuickStart/QuickStart.md)。你可以根据节点的rpc\_address和rpc\_port向任何节点发起连接。
-配置文件的说明如下:
+### 停止集群
-* `iotdb-env.sh`/`iotdb-env.bat`:环境配置项的默认配置文件。您可以在文件中配置 JAVA-JVM 的相关系统配置项。
+在任一机器上启动以下脚本进行停止所有运行在该机器上的节点服务操作:
-* `iotdb-engine.properties`:IoTDB 引擎层系统配置项的默认配置文件。您可以在文件中配置 IoTDB 引擎运行时的相关参数。此外,用户可以在文件中配置 IoTDB 存储时 TsFile 文件的相关信息,如每次将内存中的数据写入到磁盘前的缓存大小 (`group_size_in_byte`),内存中每个列打一次包的大小 (`page_size_in_byte`) 等。
+```
+# Unix/OS X
+> sbin/stop-node.sh
-* `logback.xml`: 日志配置文件,比如日志级别等。
+# Windows
+> sbin\stop-node.bat
+```
-* `iotdb-cluster.properties`: IoTDB 集群所需要的一些配置。
-`iotdb-engine.properties`、`iotdb-env.sh`/`iotdb-env.bat` 两个配置文件详细说明请参考 [附录/配置手册](../Appendix/Config-Manual.md),下面描述的配置项是在`iotdb-cluster.properties`文件中的,也可以直接查看 [配置文件](https://github.com/apache/iotdb/blob/master/cluster/src/assembly/resources/conf/iotdb-cluster.properties) 中的注释。
-* internal\_ip
+## 附录
-|名字|internal\_ip|
-|:---:|:---|
-|描述|IOTDB 集群各个节点之间内部通信的 IP 地址,比如心跳、snapshot 快照、raft log 等|
-|类型|String|
-|默认值|127.0.0.1|
-|改后生效方式|重启服务生效,集群建立后不可再修改|
+### 集群配置项
-* internal\_meta\_port
+- internal_ip
-|名字|internal\_meta\_port|
-|:---:|:---|
-|描述|IoTDB meta 服务端口,用于元数据组(又称集群管理组)通信,元数据组管理集群配置和存储组信息** IoTDB 将为每个 meta 服务自动创建心跳端口。默认 meta 服务心跳端口为`internal_meta_port+1`,请确认这两个端口不是系统保留端口并且未被占用**|
-|类型|Int32|
-|默认值|9003|
-|改后生效方式|重启服务生效,集群建立后不可再修改|
+| 名字 | internal_ip |
+| ------------ | ------------------------------------------------------------ |
+| 描述 | IOTDB 集群各个节点之间内部通信的 IP 地址,比如心跳、snapshot 快照、raft log 等 |
+| 类型 | String |
+| 默认值 | 127.0.0.1 |
+| 改后生效方式 | 重启服务生效,集群建立后不可再修改 |
-* internal\_data\_port
+- internal_meta_port
-|名字|internal\_data\_port|
-|:---:|:---|
-|描述|IoTDB data 服务端口,用于数据组通信,数据组管理数据模式和数据的存储** IoTDB 将为每个 data 服务自动创建心跳端口。默认的 data 服务心跳端口为`internal_data_port+1`。请确认这两个端口不是系统保留端口并且未被占用**|
-|类型|Int32|
-|默认值|40010|
-|改后生效方式|重启服务生效,集群建立后不可再修改|
+| 名字 | internal_meta_port |
+| ------------ | ------------------------------------------------------------ |
+| 描述 | IoTDB meta 服务端口,用于元数据组(又称集群管理组)通信,元数据组管理集群配置和存储组信息** IoTDB 将为每个 meta 服务自动创建心跳端口。默认 meta 服务心跳端口为`internal_meta_port+1`,请确认这两个端口不是系统保留端口并且未被占用** |
+| 类型 | Int32 |
+| 默认值 | 9003 |
+| 改后生效方式 | 重启服务生效,集群建立后不可再修改 |
-* cluster\_info\_public\_port
+- internal_data_port
-|名字|cluster\_info\_public\_port|
-|:---:|:---|
-|描述|用于查看集群信息(如数据分区)的 RPC 服务的接口|
-|类型|Int32|
-|默认值|6567|
-|改后生效方式| 重启服务生效|
+| 名字 | internal_data_port |
+| ------------ | ------------------------------------------------------------ |
+| 描述 | IoTDB data 服务端口,用于数据组通信,数据组管理数据模式和数据的存储** IoTDB 将为每个 data 服务自动创建心跳端口。默认的 data 服务心跳端口为`internal_data_port+1`。请确认这两个端口不是系统保留端口并且未被占用** |
+| 类型 | Int32 |
+| 默认值 | 40010 |
+| 改后生效方式 | 重启服务生效,集群建立后不可再修改 |
-* open\_server\_rpc\_port
+- cluster_info_public_port
-|名字|open\_server\_rpc\_port|
-|:---:|:---|
-|描述|是否打开单机模块的 rpc port,用于调试模式,如果设置为 true,则单机模块的 rpc port 设置为`rpc_port (in iotdb-engines.properties) + 1`|
-|类型|Boolean|
-|默认值|false|
-|改后生效方式|重启服务生效,集群建立后不可再修改|
-
-* seed\_nodes
+| 名字 | cluster_info_public_port |
+| ------------ | ----------------------------------------------- |
+| 描述 | 用于查看集群信息(如数据分区)的 RPC 服务的接口 |
+| 类型 | Int32 |
+| 默认值 | 6567 |
+| 改后生效方式 | 重启服务生效 |
-|名字|seed\_nodes|
-|:---:|:---|
-|描述|集群中节点的地址,`{IP/DOMAIN}:internal_meta_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,127.0.0.1:9005,127.0.0.1:9007|
-|改后生效方式|重启服务生效|
-
-* rpc\_thrift\_compression\_enable
+- open_server_rpc_port
-|名字|rpc\_thrift\_compression\_enable|
-|:---:|:---|
-|描述|是否开启 thrift 压缩通信,**注意这个参数要各个节点保持一致,也要与客户端保持一致,同时也要与`iotdb-engine.properties`中`rpc_thrift_compression_enable`参数保持一致**|
-|类型| Boolean|
-|默认值|false|
-|改后生效方式|重启服务生效,需要整个集群同时更改|
-
-* default\_replica\_num
-
-|名字|default\_replica\_num|
-|:---:|:---|
-|描述|集群副本数|
-|类型|Int32|
-|默认值|3|
-|改后生效方式|重启服务生效,集群建立后不可更改|
-
-* multi\_raft\_factor
-
-|名字|multi\_raft\_factor|
-|:---:|:---|
-|描述|每个数据组启动的 raft 组实例数量,默认每个数据组启动一个 raft 组|
-|类型|Int32|
-|默认值|1|
-|改后生效方式|重启服务生效,集群建立后不可更改|
-
-* cluster\_name
-
-|名字|cluster\_name|
-|:---:|:---|
-|描述|集群名称,集群名称用以标识不同的集群,**一个集群中所有节点的 cluster_name 都应相同**|
-|类型|String|
-|默认值|default|
-|改后生效方式|重启服务生效|
-
-* connection\_timeout\_ms
-
-|名字|connection\_timeout\_ms|
-|:---:|:---|
-|描述|同一个 raft 组各个节点之间的心跳超时时间,单位毫秒|
-|类型|Int32|
-|默认值|20000|
-|改后生效方式|重启服务生效|
-
-* read\_operation\_timeout\_ms
-
-|名字|read\_operation\_timeout\_ms|
-|:---:|:---|
-|描述|读取操作超时时间,仅用于内部通信,不适用于整个操作,单位毫秒|
-|类型|Int32|
-|默认值|30000|
-|改后生效方式|重启服务生效|
-
-* write\_operation\_timeout\_ms
-
-|名字|write\_operation\_timeout\_ms|
-|:---:|:---|
-|描述|写入操作超时时间,仅用于内部通信,不适用于整个操作,单位毫秒|
-|类型|Int32|
-|默认值|30000|
-|改后生效方式|重启服务生效|
-
-* min\_num\_of\_logs\_in\_mem
-
-|名字|min\_num\_of\_logs\_in\_mem|
-|:---:|:---|
-|描述|删除日志操作执行后,内存中保留的最多的提交的日志的数量。增大这个值将减少在 CatchUp 使用快照的机会,但也会增加内存占用量|
-|类型|Int32|
-|默认值|100|
-|改后生效方式|重启服务生效|
-
-* max\_num\_of\_logs\_in\_mem
-
-|名字|max\_num\_of\_logs\_in\_mem|
-|:---:|:---|
-|描述|当内存中已提交的日志条数达到这个值之后,就会触发删除日志的操作,增大这个值将减少在 CatchUp 使用快照的机会,但也会增加内存占用量|
-|类型|Int32|
-|默认值|1000|
-|改后生效方式|重启服务生效|
-
-* log\_deletion\_check\_interval\_second
-
-|名字|log\_deletion\_check\_interval\_second|
-|:---:|:---|
-|描述|检查删除日志任务的时间间隔,每次删除日志任务将会把已提交日志超过 min\_num\_of\_logs\_in\_mem 条的最老部分删除,单位秒|
-|类型|Int32|
-|默认值|60|
-|改后生效方式|重启服务生效|
-
-* enable\_auto\_create\_schema
-
-|名字|enable\_auto\_create\_schema|
-|:---:|:---|
-|描述|是否支持自动创建 schema,**这个值会覆盖`iotdb-engine.properties`中`enable_auto_create_schema`的配置**|
-|类型|BOOLEAN|
-|默认值|true|
-|改后生效方式|重启服务生效|
-
-* consistency\_level
-
-|名字|consistency\_level|
-|:---:|:---|
-|描述|读一致性,目前支持 3 种一致性:strong、mid、weak。strong consistency 每次操作都会尝试与 Leader 同步以获取最新的数据,如果失败(超时),则直接向用户返回错误; mid consistency 每次操作将首先尝试与 Leader 进行同步,但是如果失败(超时),它将使用本地当前数据向用户提供服务; weak consistency 不会与 Leader 进行同步,而只是使用本地数据向用户提供服务|
-|类型|strong、mid、weak|
-|默认值|mid|
-|改后生效方式|重启服务生效|
-
-* is\_enable\_raft\_log\_persistence
-
-|名字|is\_enable\_raft\_log\_persistence|
-|:---:|:---|
-|描述|是否开启 raft log 持久化|
-|类型|BOOLEAN|
-|默认值|true|
-|改后生效方式|重启服务生效|
-
-## 开启 GC 日志
-GC 日志默认是关闭的。为了性能调优,用户可能会需要收集 GC 信息。
-若要打开 GC 日志,则需要在启动 IoTDB Server 的时候加上`printgc`参数:
-
-```bash
-nohup sbin/start-node.sh printgc >/dev/null 2>&1 &
-```
-或者
+| 名字 | open_server_rpc_port |
+| ------------ | ------------------------------------------------------------ |
+| 描述 | 是否打开单机模块的 rpc port,用于调试模式,如果设置为 true,则单机模块的 rpc port 设置为`rpc_port (in iotdb-engines.properties) + 1` |
+| 类型 | Boolean |
+| 默认值 | false |
+| 改后生效方式 | 重启服务生效,集群建立后不可再修改 |
+
+- seed_nodes
-```bash
-sbin\start-node.bat printgc
-```
+| 名字 | seed_nodes |
+| ------------ | ------------------------------------------------------------ |
+| 描述 | 集群中节点的地址,`{IP/DOMAIN}:internal_meta_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,127.0.0.1:9005,127.0.0.1:9007 |
+| 改后生效方式 | 重启服务生效 |
+
+- rpc_thrift_compression_enable
-GC 日志会被存储在`IOTDB_HOME/logs/`下面。
+| 名字 | rpc_thrift_compression_enable |
+| ------------ | ------------------------------------------------------------ |
+| 描述 | 是否开启 thrift 压缩通信,**注意这个参数要各个节点保持一致,也要与客户端保持一致,同时也要与`iotdb-engine.properties`中`rpc_thrift_compression_enable`参数保持一致** |
+| 类型 | Boolean |
+| 默认值 | false |
+| 改后生效方式 | 重启服务生效,需要整个集群同时更改 |
+
+- default_replica_num
+
+| 名字 | default_replica_num |
+| ------------ | -------------------------------- |
+| 描述 | 集群副本数 |
+| 类型 | Int32 |
+| 默认值 | 3 |
+| 改后生效方式 | 重启服务生效,集群建立后不可更改 |
+
+- multi_raft_factor
+
+| 名字 | multi_raft_factor |
+| ------------ | ------------------------------------------------------------ |
+| 描述 | 每个数据组启动的 raft 组实例数量,默认每个数据组启动一个 raft 组 |
+| 类型 | Int32 |
+| 默认值 | 1 |
+| 改后生效方式 | 重启服务生效,集群建立后不可更改 |
+
+- cluster_name
+
+| 名字 | cluster_name |
+| ------------ | ------------------------------------------------------------ |
+| 描述 | 集群名称,集群名称用以标识不同的集群,**一个集群中所有节点的 cluster_name 都应相同** |
+| 类型 | String |
+| 默认值 | default |
+| 改后生效方式 | 重启服务生效 |
+
+- connection_timeout_ms
+
+| 名字 | connection_timeout_ms |
+| ------------ | -------------------------------------------------- |
+| 描述 | 同一个 raft 组各个节点之间的心跳超时时间,单位毫秒 |
+| 类型 | Int32 |
+| 默认值 | 20000 |
+| 改后生效方式 | 重启服务生效 |
+
+- read_operation_timeout_ms
+
+| 名字 | read_operation_timeout_ms |
+| ------------ | ------------------------------------------------------------ |
+| 描述 | 读取操作超时时间,仅用于内部通信,不适用于整个操作,单位毫秒 |
+| 类型 | Int32 |
+| 默认值 | 30000 |
+| 改后生效方式 | 重启服务生效 |
+
+- write_operation_timeout_ms
+
+| 名字 | write_operation_timeout_ms |
+| ------------ | ------------------------------------------------------------ |
+| 描述 | 写入操作超时时间,仅用于内部通信,不适用于整个操作,单位毫秒 |
+| 类型 | Int32 |
+| 默认值 | 30000 |
+| 改后生效方式 | 重启服务生效 |
+
+- min_num_of_logs_in_mem
+
+| 名字 | min_num_of_logs_in_mem |
+| ------------ | ------------------------------------------------------------ |
+| 描述 | 删除日志操作执行后,内存中保留的最多的提交的日志的数量。增大这个值将减少在 CatchUp 使用快照的机会,但也会增加内存占用量 |
+| 类型 | Int32 |
+| 默认值 | 100 |
+| 改后生效方式 | 重启服务生效 |
+
+- max_num_of_logs_in_mem
+
+| 名字 | max_num_of_logs_in_mem |
+| ------------ | ------------------------------------------------------------ |
+| 描述 | 当内存中已提交的日志条数达到这个值之后,就会触发删除日志的操作,增大这个值将减少在 CatchUp 使用快照的机会,但也会增加内存占用量 |
+| 类型 | Int32 |
+| 默认值 | 1000 |
+| 改后生效方式 | 重启服务生效 |
+
+- log_deletion_check_interval_second
+
+| 名字 | log_deletion_check_interval_second |
+| ------------ | ------------------------------------------------------------ |
+| 描述 | 检查删除日志任务的时间间隔,每次删除日志任务将会把已提交日志超过 min_num_of_logs_in_mem 条的最老部分删除,单位秒 |
+| 类型 | Int32 |
+| 默认值 | 60 |
+| 改后生效方式 | 重启服务生效 |
+
+- enable_auto_create_schema
+
+| 名字 | enable_auto_create_schema |
+| ------------ | ------------------------------------------------------------ |
+| 描述 | 是否支持自动创建 schema,**这个值会覆盖`iotdb-engine.properties`中`enable_auto_create_schema`的配置** |
+| 类型 | BOOLEAN |
+| 默认值 | true |
+| 改后生效方式 | 重启服务生效 |
+
+- consistency_level
+
+| 名字 | consistency_level |
+| ------------ | ------------------------------------------------------------ |
+| 描述 | 读一致性,目前支持 3 种一致性:strong、mid、weak。strong consistency 每次操作都会尝试与 Leader 同步以获取最新的数据,如果失败(超时),则直接向用户返回错误; mid consistency 每次操作将首先尝试与 Leader 进行同步,但是如果失败(超时),它将使用本地当前数据向用户提供服务; weak consistency 不会与 Leader 进行同步,而只是使用本地数据向用户提供服务 |
+| 类型 | strong、mid、weak |
+| 默认值 | mid |
+| 改后生效方式 | 重启服务生效 |
+
+- is_enable_raft_log_persistence
+
+| 名字 | is_enable_raft_log_persistence |
+| ------------ | ------------------------------ |
+| 描述 | 是否开启 raft log 持久化 |
+| 类型 | BOOLEAN |
+| 默认值 | true |
+| 改后生效方式 | 重启服务生效 |