This is an automated email from the ASF dual-hosted git repository.
qiaojialin 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 31e77506b3 Update cluster UserGuide and Config-Manual (#6460)
31e77506b3 is described below
commit 31e77506b37647a52c16ab706686bc84246c7047
Author: Jialin Qiao <[email protected]>
AuthorDate: Mon Jun 27 18:02:25 2022 +0800
Update cluster UserGuide and Config-Manual (#6460)
---
.../resources/conf/iotdb-confignode.properties | 6 +-
docs/UserGuide/Cluster/Cluster-Concept.md | 97 +++++
docs/UserGuide/Cluster/Cluster-Setup-Example.md | 293 ---------------
docs/UserGuide/Cluster/Cluster-Setup.md | 393 ++++-----------------
.../Reference/ConfigNode-Config-Manual.md | 283 +++++++++++++++
...{Config-Manual.md => DataNode-Config-Manual.md} | 240 +++++++++----
docs/zh/UserGuide/Cluster/Cluster-Concept.md | 98 +++++
docs/zh/UserGuide/Cluster/Cluster-Setup-Example.md | 298 ----------------
docs/zh/UserGuide/Cluster/Cluster-Setup.md | 382 +++-----------------
.../Reference/ConfigNode-Config-Manual.md | 278 +++++++++++++++
...{Config-Manual.md => DataNode-Config-Manual.md} | 178 +++++++---
site/src/main/.vuepress/config.js | 14 +-
12 files changed, 1193 insertions(+), 1367 deletions(-)
diff --git a/confignode/src/assembly/resources/conf/iotdb-confignode.properties
b/confignode/src/assembly/resources/conf/iotdb-confignode.properties
index 86590d6f34..2dc311e6da 100644
--- a/confignode/src/assembly/resources/conf/iotdb-confignode.properties
+++ b/confignode/src/assembly/resources/conf/iotdb-confignode.properties
@@ -57,8 +57,8 @@ config_nodes=0.0.0.0:22277
# DataRegion consensus protocol type
# These consensus protocols are currently supported:
# 1. org.apache.iotdb.consensus.standalone.StandAloneConsensus(Consensus
patterns optimized specifically for single replica)
-# 2. org.apache.iotdb.consensus.ratis.RatisConsensus(Raft protocol)
-# 3. org.apache.iotdb.consensus.multileader.MultiLeaderConsensus(weak
consistency, high performance)
+# 2. org.apache.iotdb.consensus.multileader.MultiLeaderConsensus(weak
consistency, high performance)
+# 3. org.apache.iotdb.consensus.ratis.RatisConsensus(Raft protocol)
# Datatype: String
#
data_region_consensus_protocol_class=org.apache.iotdb.consensus.standalone.StandAloneConsensus
@@ -258,6 +258,6 @@ config_nodes=0.0.0.0:22277
####################
-# The heartbeat interval in milliseconds, default is 3000ms
+# The heartbeat interval in milliseconds, default is 1000ms
# Datatype: long
# heartbeat_interval=1000
diff --git a/docs/UserGuide/Cluster/Cluster-Concept.md
b/docs/UserGuide/Cluster/Cluster-Concept.md
new file mode 100644
index 0000000000..a7330f64be
--- /dev/null
+++ b/docs/UserGuide/Cluster/Cluster-Concept.md
@@ -0,0 +1,97 @@
+<!--
+
+```
+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.
+```
+
+-->
+
+## Basic Concepts of IoTDB Cluster
+
+Apache IoTDB Cluster contains two types of nodes: ConfigNode and DataNode,
each is a process that could be deployed independently.
+
+A illustrate of the cluster architecture:
+
+<img style="width:100%; max-width:800px; max-height:600px; margin-left:auto;
margin-right:auto; display:block;"
src="https://github.com/apache/iotdb-bin-resources/blob/main/docs/UserGuide/Cluster/Architecture.png?raw=true">
+
+ConfigNode is the control node of the cluster, which manage the node status of
cluster, partition information, etc. All ConfigNodes in the cluster form a high
available group, which is fully replicated.
+
+DataNode stores the data and schema of cluster, which manage multiple data
regions and schema regions. Data is the time-value pair, and schema is the path
and data type of each timeseries.
+
+Client could only connect to the DataNode for operation.
+
+## Characteristics of Cluster
+
+* Native Cluster Architecture
+ * All module is designed for the IoTDB cluster.
+ * Standalone is a special form of Cluster.
+* High Scalability
+ * Support add nodes in a few seconds without data migration.
+* Massive Parallel Processing Architecture
+ * Adopt the MPP architecture and volcano module for data processing, which
has high extensibility.
+* Configurable Consensus Protocol
+ * We could adopt different consensus protocol for data replicas and schema
replicas.
+* Extensible Partition Strategy
+ * The cluster adopts the lookup table for data and schema partitions,
which is flexible to extend.
+* Built-in Metric Framework
+ * Monitor the status of each node in cluster.
+
+## Partitioning Strategy
+
+The partitioning strategy partitions data and schema into different Regions,
and allocates Regions to different DataNodes.
+
+It is recommended to set 1 storage group (there is no need to set the storage
group according to the number of cores as in version 0.13), which is used as
the database concept, and the cluster will dynamically allocate resources
according to the number of nodes and cores.
+
+The storage group contains multiple SchemaRegions (schema shards) and
DataRegions (data shards), which are managed by DataNodes.
+
+* Schema partition strategy
+ * For a time series schema, the ConfigNode maps the device ID (full path
from root to the penultimate tier node) into a series\_partition\_slot and
assigns this partition slot to a SchemaRegion group.
+* Data partition strategy
+ * For a time series data point, the ConfigNode will map to a
series\_partition\_slot (vertical partition) according to the device ID, and
then map it to a time\_partition\_slot (horizontal partition) according to the
data timestamp, and allocate this data partition to a DataRegion group.
+
+IoTDB uses a slot-based partitioning strategy, so the size of the partition
information is controllable and does not grow infinitely with time series or
the number of devices.
+
+Multiple replicas of a Region will be allocated to different DataNodes to
avoid single point of failure, and the load balance of different DataNodes will
be ensured when Regions are allocated.
+
+## Replication Strategy
+
+The replication strategy replicates data in multiple replicas, which are
copies of each other. Multiple copies can provide high-availability services
together and tolerate the failure of some copies.
+
+A region is the basic unit of replication. Multiple replicas of a region
construct a high-availability replication group, to support high availability.
+
+* Replication and consensus
+ * Partition information: The cluster has 1 partition information group
consisting of all ConfigNodes.
+ * Data: The cluster has multiple DataRegion groups, and each DataRegion
group has multiple DataRegions with the same id.
+ * Schema: The cluster has multiple SchemaRegion groups, and each
SchemaRegion group has multiple SchemaRegions with the same id.
+
+A illustration of the partition allocation in cluster:
+
+<img style="width:100%; max-width:800px; max-height:600px; margin-left:auto;
margin-right:auto; display:block;"
src="https://github.com/apache/iotdb-bin-resources/blob/main/docs/UserGuide/Cluster/Data-Partition.png?raw=true">
+
+The figure contains 1 SchemaRegion group, and the schema_replication_factor is
3, so the 3 white SchemaRegion-0s form a replication group, and the Raft
protocol is used to ensure data consistency.
+
+The figure contains 3 DataRegion groups, and the data_replication_factor is 3,
so there are 9 DataRegions in total.
+
+## Consensus Protocol (Consistency Protocol)
+
+Among multiple replicas of each region group, data consistency is guaranteed
through a consensus protocol, which routes read and write requests to multiple
replicas.
+
+* Current supported consensus protocol
+ * Standalone:Could only be used when replica is 1, which is the empty
implementation of the consensus protocol.
+ * MultiLeader:Could be used in any number of replicas, only for DataRegion,
writes can be applied on each replica and replicated asynchronously to other
replicas.
+ * Ratis:Raft consensus protocol, Could be used in any number of replicas,
could be used for any region groups。
\ No newline at end of file
diff --git a/docs/UserGuide/Cluster/Cluster-Setup-Example.md
b/docs/UserGuide/Cluster/Cluster-Setup-Example.md
deleted file mode 100644
index 70e6c4bef9..0000000000
--- a/docs/UserGuide/Cluster/Cluster-Setup-Example.md
+++ /dev/null
@@ -1,293 +0,0 @@
-<!--
-
- 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.
-
--->
-
-## Prerequisite
-Note: Please install MinGW or WSL or git bash if you are using Windows.
-
-## Example of distributed configurations 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.14.0-SNAPSHOT/sbin/start-node.sh
>/dev/null 2>&1 &
-```
-
-### Use the official website release version:
-
-```
-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 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
-```
-
-**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
-```
-
-**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
-```
-
-### Compile from source code:
-
-```
-mvn clean package -DskipTests
-chmod -R 777 ./cluster/target/
-nohup ./cluster/target/iotdb-cluster-0.14.0-SNAPSHOT/sbin/start-node.sh
./cluster/target/test-classes/node1conf/ >/dev/null 2>&1 &
-nohup ./cluster/target/iotdb-cluster-0.14.0-SNAPSHOT/sbin/start-node.sh
./cluster/target/test-classes/node2conf/ >/dev/null 2>&1 &
-nohup ./cluster/target/iotdb-cluster-0.14.0-SNAPSHOT/sbin/start-node.sh
./cluster/target/test-classes/node3conf/ >/dev/null 2>&1 &
-```
-### Use the official website release version:
-
-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.
The private ip corresponds to configuration item` internal_ ip `in
iotdb-cluster.properties, and the public ip corresponds to configuration item`
rpc_ address` in iotdb-engine.properties.
-
-### Configurations
-**NodeA**:
-
-***iotdb-cluster.properties***
-
-```
-seed_nodes = A_private_Ip:9003,B_private_Ip:9003,C_private_Ip:9003
-default_replica_num = 3
-internal_meta_port = 9003
-internal_data_port = 40010
-internal_address = A_private_Ip
-```
-
-***iotdb-engine.properties***
-
-```
-rpc_port = 6667
-rpc_address = A_public_ip
-```
-
-**NodeB**:
-
-***iotdb-cluster.properties***
-
-```
-seed_nodes = A_private_Ip:9003,B_private_Ip:9003,C_private_Ip:9003
-default_replica_num = 3
-internal_meta_port = 9003
-internal_data_port = 40010
-internal_address = B_private_Ip
-```
-
-***iotdb-engine.properties***
-
-```
-rpc_port = 6667
-rpc_address = B_public_ip
-```
-
-**NodeC**:
-
-***iotdb-cluster.properties***
-
-```
-seed_nodes = A_private_Ip:9003,B_private_Ip:9003,C_private_Ip:9003
-default_replica_num = 3
-internal_meta_port = 9003
-internal_data_port = 40010
-internal_address = C_private_Ip
-```
-
-***iotdb-engine.properties***
-
-```
-rpc_port = 6667
-rpc_address = 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).
-
-
-
-### Compile from source code:
-
-```
-mvn clean package -DskipTests
-chmod -R 777 ./cluster/target/
-cd cluster/target/iotdb-cluster-0.14.0-SNAPSHOT/
-```
-### Use the official website release version:
-
-Download the release version:
-```
-curl -O
https://downloads.apache.org/iotdb/0.12.4/apache-iotdb-0.12.4-cluster-bin.zip
-```
-
-Unzip the package:
-
-```
-unzip apache-iotdb-0.12.4-cluster-bin.zip
-```
-
-Enter IoTDB cluster root directory:
-
-```
-cd apache-iotdb-0.12.4-cluster-bin
-```
-
-Set default\_replica\_num = 3: default value of this configuration item is 3
-
-Set internal\_ip = private ip of node (e.g. 192.168.1.1)
-```
-sed -i -e 's/^internal_address=127.0.0.1$/internal_address=192.168.1.1/g'
conf/iotdb-cluster.properties
-```
-Set seed\_node = A_private_Ip:9003,B_private_Ip:9003,C_private_Ip:9003 (e.g.
private ip of all three nodes are 192.168.1.1,192.168.1.2,192.168.1.3)
-```
-sed -i -e
's/^seed_nodes=127.0.0.1:9003,127.0.0.1:9005,127.0.0.1:9007$/seed_nodes=192.168.1.1:9003,192.168.1.2:9003,192.168.1.3:9003/g'
conf/iotdb-cluster.properties
-```
-Set rpc\_address = public ip of node (e.g. 192.168.1.1)
-```
-sed -i -e 's/^rpc_address=127.0.0.1$/rpc_address=192.168.1.1/g'
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 &
-```
\ No newline at end of file
diff --git a/docs/UserGuide/Cluster/Cluster-Setup.md
b/docs/UserGuide/Cluster/Cluster-Setup.md
index e32e9b1fbb..dbf46e8136 100644
--- a/docs/UserGuide/Cluster/Cluster-Setup.md
+++ b/docs/UserGuide/Cluster/Cluster-Setup.md
@@ -19,376 +19,103 @@
-->
-## Cluster setup
+## Cluster Setup
-You can follow this document to start an IoTDB cluster.
+This article is the setup process of IoTDB Cluster (0.14.0-preview1).
-## Prerequisite
-To use IoTDB, you need to have:
+## Environments
-1. Java >= 1.8 (Please make sure the environment path has been set)
+1. JDK>=1.8
-2. Set the max open files num as 65535 to avoid "too many open files" problem.
+2. Max open file 65535
-
+3. Disable the swap memory
-## 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}**
+## Get the binary distribution
### 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**:
+Download the binary distribution from website [Download
Page](https://iotdb.apache.org/Download/)
-* iotdb-engine.properties:
+### Compiled from source code
- * 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
-
-### 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:
+Download the source code:
```
-# Unix/OS X
-> nohup sbin/start-node.sh [printgc] [<conf_path>] >/dev/null 2>&1 &
-
-# Windows
-> sbin\start-node.bat [printgc] [<conf_path>]
+git clone https://github.com/apache/iotdb.git
```
-`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.
-
-**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.**
-
-### 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:**
+The default branch is master, you could checkout to the release tag:
```
-# Unix/OS X
-> nohup sbin/add-node.sh [printgc] [<conf_path>] >/dev/null 2>&1 &
-;
-# Windows
-> sbin\add-node.bat [printgc] [<conf_path>]
+git checkout v0.14.0-preview1
```
-`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:**
+Under the source root folder:
```
-# Unix/OS X
-> sbin/remove-node.sh <internal_address> <internal_meta_port>
-
-# Windows
-> sbin\remove-node.bat <internal_address> <internal_meta_port>
+mvn clean package -pl distribution -am -DskipTests
```
-`internal_address` means the IP address of the node to be deleted
`internal_meta_port` means the meta port of the node to be deleted
+Then you will get the binary distribution under **distribution/target**, in
which the **all-bin** contains ConfigNode and DataNode,and DataNode contains
the Cli.
-### Use Cli
-
-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.
-
-### **Stop Cluster**
-
-To stop the services of all the nodes on a single machine, you need to execute
the following commands:
-
-```
-# Unix/OS X
-> sbin/stop-node.sh
-
-# Windows
-> sbin\stop-node.bat
-```
+## Binary Distribution Content
+| **Folder** | **Description** |
+| -------- | -------------------------------------------- |
+| confignode | Contains start/stop shell, configurations, logs, data of
ConfigNode |
+| datanode | Contains start/stop shell, configurations, logs, data of
DataNode, cli shell|
+| grafana-metrics-example | Grafana metric page module |
+| lib | Jar files folder |
+| tools | System tools |
+## Start the Cluster
-## Appendix
+Users could start a cluster which contains multiple ConfigNode and DataNode.
+A cluster need at least one ConfigNode and no less than the number of
data/schema_replication_factor DataNodes.
-### Cluster Configuration
+The total process are three steps:
-- internal\_ip
+* Start the first ConfigNode
+* Add ConfigNode (Optional)
+* Add DataNode
-| Name | internal\_ip |
-| ----------- | ------------------------------------------------------------ |
-| Description | IP address of internal communication between nodes in IOTDB
cluster, such as heartbeat, snapshot, raft log, etc. **`internal_address` is a
private ip.** |
-| Type | String |
-| Default | 127.0.0.1 |
-| Effective | After restart system, shall NOT change after cluster is up |
+### Start the first ConfigNode
-- internal\_meta\_port
+Important parameters in iotdb-confignode.properties:
-| 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 |
+| **Configuration** | **Description** |
+| -------- | -------------------------------------------- |
+| rpc\_address | Internal rpc service address of ConfigNode |
+| rpc\_port | Internal rpc service address of ConfigNode |
+| consensus\_port | ConfigNode replication consensus protocol communication
port |
+| config\_nodes | Target ConfigNode address, if the current is the first
ConfigNode, then set its address:port |
+| data\_replication\_factor | Data replication factor, no more than DataNode
number |
+| data\_region\_consensus\_protocol\_class | Consensus protocol of data
replicas |
+| schema\_replication\_factor | Schema replication factor, no more than
DataNode number |
+| schema\_region\_consensus\_protocol\_class | Consensus protocol of schema
replicas |
-- internal\_data\_port
+More details [ConfigNode
Configurations](https://iotdb.apache.org/UserGuide/Master/Reference/ConfigNode-Config-Manual.html)
-| 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 |
+### Add ConfigNode (Optional)
-- cluster\_info\_public\_port
+This will add the replication factor of ConfigNode, except for the port
couldn't conflict, make sure other configurations are the same with existing
ConfigNode in Cluster.
-| 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 |
+### Start DataNode
-- open\_server\_rpc\_port
+You could add any number of DataNode.
-| 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
+Important parameters in iotdb-datanode.properties
-| Name | seed\_nodes |
-| ----------- | ------------------------------------------------------------ |
-| Description | The address(internal ip) 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 us [...]
-| 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
+| **Configuration** | **Description** |
+| -------- | -------------------------------------------- |
+| rpc\_address | Client RPC Service address |
+| rpc\_port | Client RPC Service port |
+| internal\_address | Control flow address of DataNode inside cluster
|
+| internal\_port | Control flow port of DataNode inside cluster |
+| mpp\_data\_exchange\_port | Data flow port of DataNode inside cluster
|
+| data\_region\_consensus\_port | Data replicas communication port for
consensus |
+| schema\_region\_consensus\_port | Schema replicas communication port for
consensus |
+| config\_nodes | Running ConfigNode of the Cluster |
-| 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 | Thrift socket and connection timeout between raft nodes, in
milliseconds. **Note that the timeout of the connection used for sending
heartbeats and requesting votes will be adjust to min(heartbeat\_interval\_ms,
connection\_timeout\_ms).** |
-| Type | Int32 |
-| Default | 20000 |
-| Effective | After restart system |
-
-- heartbeat\_interval\_ms
-
-| Name | heartbeat\_interval\_ms |
-| ----------- | ------------------------------------------------------------ |
-| Description | The time period between heartbeat broadcasts in leader, in
milliseconds |
-| Type | Int64 |
-| Default | 1000 |
-| Effective | After restart system |
-
-- election\_timeout\_ms
-
-| Name | election\_timeout\_ms |
-| ----------- | ------------------------------------------------------------ |
-| Description | The election timeout in follower, or the time waiting for
request votes in elector, in milliseconds |
-| Type | Int64 |
-| 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 |
+More details [DataNode
Configurations](https://iotdb.apache.org/UserGuide/Master/Reference/DataNode-Config-Manual.html)
\ No newline at end of file
diff --git a/docs/UserGuide/Reference/ConfigNode-Config-Manual.md
b/docs/UserGuide/Reference/ConfigNode-Config-Manual.md
new file mode 100644
index 0000000000..e54d9173f9
--- /dev/null
+++ b/docs/UserGuide/Reference/ConfigNode-Config-Manual.md
@@ -0,0 +1,283 @@
+<!--
+
+ 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.
+
+-->
+
+# ConfigNode Configuration
+
+IoTDB ConfigNode files are under `confignode/conf`.
+
+* `confignode-env.sh/bat`:Environment configurations, in which we could set
the memory allocation of ConfigNode.
+
+* `iotdb-confignode.properties`:IoTDB ConfigNode system configurations.
+
+## Environment Configuration File(confignode-env.sh/bat)
+
+The environment configuration file is mainly used to configure the Java
environment related parameters when ConfigNode is running, such as JVM related
configuration. This part of the configuration is passed to the JVM when the
ConfigNode starts.
+
+The details of each parameter are as follows:
+
+* MAX\_HEAP\_SIZE
+
+|Name|MAX\_HEAP\_SIZE|
+|:---:|:---|
+|Description|The maximum heap memory size that IoTDB can use |
+|Type|String|
+|Default| On Linux or MacOS, the default is one quarter of the memory. On
Windows, the default value for 32-bit systems is 512M, and the default for
64-bit systems is 2G.|
+|Effective|After restarting system|
+
+* HEAP\_NEWSIZE
+
+|Name|HEAP\_NEWSIZE|
+|:---:|:---|
+|Description|The minimum heap memory size that IoTDB will use when startup |
+|Type|String|
+|Default| On Linux or MacOS, the default is min{cores * 100M, one quarter of
MAX\_HEAP\_SIZE}. On Windows, the default value for 32-bit systems is 512M, and
the default for 64-bit systems is 2G.|
+|Effective|After restarting system|
+
+* MAX\_DIRECT\_MEMORY\_SIZE
+
+|Name|MAX\_DIRECT\_MEMORY\_SIZE|
+|:---:|:---|
+|Description|The max direct memory that IoTDB could use|
+|Type|String|
+|Default| Equal to the MAX\_HEAP\_SIZE|
+|Effective|After restarting system|
+
+
+## ConfigNode Configuration File(iotdb-confignode.properties)
+
+IoTDB Cluster configuration is in ConfigNode.
+
+### Internal RPC Service Configurations
+
+* rpc\_address
+
+|Name| rpc\_address |
+|:---:|:---|
+|Description| Client rpc service address |
+|Type| String |
+|Default| 0.0.0.0|
+|Effective|After restarting system|
+
+* rpc\_port
+
+|Name| rpc\_port |
+|:---:|:---|
+|Description| Client RPC service port|
+|Type| Short Int : [0,65535] |
+|Default| 6667 |
+|Effective|After restarting system|
+
+* config\_nodes
+
+|Name| config\_nodes |
+|:---:|:---|
+|Description| Target ConfigNode address, for current ConfigNode to join the
cluster |
+|Type| String |
+|Default| 0.0.0.0:22277 |
+|Effective|After restarting system|
+
+* rpc\_thrift\_compression\_enable
+
+|Name| rpc\_thrift\_compression\_enable |
+|:---:|:---|
+|Description| Whether enable thrift's compression (using GZIP).|
+|Type|Boolean|
+|Default| false |
+|Effective|After restarting system|
+
+* rpc\_advanced\_compression\_enable
+
+|Name| rpc\_advanced\_compression\_enable |
+|:---:|:---|
+|Description| Whether enable thrift's advanced compression.|
+|Type|Boolean|
+|Default| false |
+|Effective|After restarting system|
+
+* rpc\_max\_concurrent\_client\_num
+
+|Name| rpc\_max\_concurrent\_client\_num |
+|:---:|:---|
+|Description| Max concurrent rpc connections|
+|Type| Short Int : [0,65535] |
+|Description| 65535 |
+|Effective|After restarting system|
+
+* thrift\_max\_frame\_size
+
+|Name| thrift\_max\_frame\_size |
+|:---:|:---|
+|Description| Max size of bytes of each thrift RPC request/response|
+|Type| Long |
+|Unit|Byte|
+|Default| 536870912 |
+|Effective|After restarting system|
+
+* thrift\_init\_buffer\_size
+
+|Name| thrift\_init\_buffer\_size |
+|:---:|:---|
+|Description| Initial size of bytes of buffer that thrift used |
+|Type| long |
+|Default| 1024 |
+|Effective|After restarting system|
+
+
+### Replication and Consensus
+
+* consensus\_port
+
+|Name| consensus\_port |
+|:---:|:---|
+|Description| ConfigNode data Consensus Port |
+|Type| Short Int : [0,65535] |
+|Default| 22278 |
+|Effective|After restarting system|
+
+
+* data\_replication\_factor
+
+|Name| data\_replication\_factor |
+|:---:|:---|
+|Description| Data replication num|
+|Type| Int |
+|Default| 1 |
+|Effective|After restarting system|
+
+* data\_region\_consensus\_protocol\_class
+
+|Name| data\_region\_consensus\_protocol\_class |
+|:---:|:---|
+|Description| Consensus protocol of data replicas, StandAloneConsensus could
only be used in 1 replica,larger than 1 replicas could use MultiLeaderConsensus
or RatisConsensus |
+|Type| String |
+|Default| org.apache.iotdb.consensus.standalone.StandAloneConsensus |
+|Effective|Only allowed to be modified in first start up|
+
+* schema\_replication\_factor
+
+|Name| schema\_replication\_factor |
+|:---:|:---|
+|Description| Schema replication num|
+|Type| Int |
+|Default| 1 |
+|Effective|After restarting system|
+
+
+* schema\_region\_consensus\_protocol\_class
+
+|Name| schema\_region\_consensus\_protocol\_class |
+|:---:|:---|
+|Description| Consensus protocol of schema replicas, StandAloneConsensus could
only be used in 1 replica,larger than 1 replicas could only use RatisConsensus
| |
+|Type| String |
+|Default| org.apache.iotdb.consensus.standalone.StandAloneConsensus |
+|Effective|Only allowed to be modified in first start up|
+
+### HeartBeat
+
+* heartbeat\_interval
+
+|Name| heartbeat\_interval |
+|:---:|:---|
+|Description| Heartbeat interval in the cluster nodes |
+|Type| Long |
+|Unit| ms |
+|Default| 1000 |
+|Effective|After restarting system|
+
+
+### Partition Strategy
+
+* series\_partition\_slot\_num
+
+|Name| series\_partition\_slot\_num |
+|:---:|:---|
+|Description| Slot num of series partition |
+|Type| Int |
+|Default| 10000 |
+|Effective|Only allowed to be modified in first start up|
+
+* series\_partition\_executor\_class
+
+|Name| series\_partition\_executor\_class |
+|:---:|:---|
+|Description| Series partition hash function |
+|Type| String |
+|Default| org.apache.iotdb.commons.partition.executor.hash.BKDRHashExecutor |
+|Effective|Only allowed to be modified in first start up|
+
+### Storage Group
+
+* default\_ttl
+
+|Name| default\_ttl |
+|:---:|:---|
+|Description| Default ttl when each storage group created |
+|Type| Long |
+|Default| Infinity |
+|Effective|After restarting system|
+
+* time\_partition\_interval
+
+|Name| time\_partition\_interval |
+|:---:|:---|
+|Description| Time partition interval of data when ConfigNode allocate data |
+|Type| Long |
+|Default| 604800 |
+|Effective|Only allowed to be modified in first start up|
+
+
+### Data Directory
+
+* system\_dir
+
+|Name| system\_dir |
+|:---:|:---|
+|Description| ConfigNode system data dir |
+|Type| String |
+|Default| data/system(Windows:data\\system) |
+|Effective|After restarting system|
+
+* consensus\_dir
+
+|Name| consensus\_dir |
+|:---:|:---|
+|Description| ConfigNode Consensus protocol data dir |
+|Type| String |
+|Default| data/consensus(Windows:data\\consensus) |
+|Effective|After restarting system|
+
+* udf\_lib\_dir
+
+|Name| udf\_lib\_dir |
+|:---:|:---|
+|Description| UDF log and jar file dir |
+|Type| String |
+|Default| ext/udf(Windows:ext\\udf) |
+|Effective|After restarting system|
+
+* temporary\_lib\_dir
+
+|Name| temporary\_lib\_dir |
+|:---:|:---|
+|Description| UDF jar file temporary dir |
+|Type| String |
+|Default| ext/temporary(Windows:ext\\temporary) |
+|Effective|After restarting system|
\ No newline at end of file
diff --git a/docs/UserGuide/Reference/Config-Manual.md
b/docs/UserGuide/Reference/DataNode-Config-Manual.md
similarity index 89%
rename from docs/UserGuide/Reference/Config-Manual.md
rename to docs/UserGuide/Reference/DataNode-Config-Manual.md
index 764eba562c..0164e772a7 100644
--- a/docs/UserGuide/Reference/Config-Manual.md
+++ b/docs/UserGuide/Reference/DataNode-Config-Manual.md
@@ -19,39 +19,32 @@
-->
-# Configuration Parameters
+# DataNode/Standalone Configuration Parameters
+We use the same configuration files for IoTDB DataNode and Standalone version,
all under the `datanode/conf`.
-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.
+* `datanode-env.sh/bat`:Environment configurations, in which we could set the
memory allocation of DataNode and Standalone.
-In total, we provide users three kinds of configurations module:
-
-* environment configuration file (`datanode-env.bat`, `datanode-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-datanode.properties`).
- * `iotdb-datanode.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 JDBC service listening port
(`rpc_port`), unsequence data storage directory (`unsequence_data_dir`), etc.
What's more, Users can configure the information about the TsFile, such as the
data size written to the disk per time(`group_size_in_byte`).
-
-* log configuration file (`logback.xml`)
-
-The configuration files of the three configuration items are located in the
IoTDB installation directory: `$IOTDB_HOME/conf` folder.
+* `iotdb-datanode.properties`:IoTDB DataNode/Standalone system configurations.
## Hot Modification Configuration
-For the convenience of users, IoTDB server provides users with hot
modification function, that is, modifying some configuration parameters in
`iotdb engine. Properties` during the system operation and applying them to the
system immediately.
+For the convenience of users, IoTDB provides users with hot modification
function, that is, modifying some configuration parameters in
`iotdb-datanode.properties` during the system operation and applying them to
the system immediately.
In the parameters described below, these parameters whose way of `Effective`
is `trigger` support hot modification.
-Trigger way: The client sends the command `load configuration` to the IoTDB
server. See Chapter 4 for the usage of the client.
+Trigger way: The client sends the command(sql) `load configuration` to the
IoTDB server.
-## IoTDB Environment Configuration File
+## Environment Configuration File(datanode-env.sh/bat)
-The environment configuration file is mainly used to configure the Java
environment related parameters when IoTDB Server is running, such as JVM
related configuration. This part of the configuration is passed to the JVM when
the IoTDB Server starts. Users can view the contents of the environment
configuration file by viewing the `datanode-env.sh` (or `datanode-env.bat`)
file.
+The environment configuration file is mainly used to configure the Java
environment related parameters when DataNode is running, such as JVM related
configuration. This part of the configuration is passed to the JVM when the
DataNode starts.
-The detail of each variables are as follows:
+The details of each parameter are as follows:
* MAX\_HEAP\_SIZE
|Name|MAX\_HEAP\_SIZE|
|:---:|:---|
-|Description|The maximum heap memory size that IoTDB can use at startup.|
+|Description|The maximum heap memory size that IoTDB can use |
|Type|String|
|Default| On Linux or MacOS, the default is one quarter of the memory. On
Windows, the default value for 32-bit systems is 512M, and the default for
64-bit systems is 2G.|
|Effective|After restarting system|
@@ -60,11 +53,20 @@ The detail of each variables are as follows:
|Name|HEAP\_NEWSIZE|
|:---:|:---|
-|Description|The minimum heap memory size that IoTDB can use at startup.|
+|Description|The minimum heap memory size that IoTDB will use when startup |
|Type|String|
|Default| On Linux or MacOS, the default is min{cores * 100M, one quarter of
MAX\_HEAP\_SIZE}. On Windows, the default value for 32-bit systems is 512M, and
the default for 64-bit systems is 2G.|
|Effective|After restarting system|
+* MAX\_DIRECT\_MEMORY\_SIZE
+
+|Name|MAX\_DIRECT\_MEMORY\_SIZE|
+|:---:|:---|
+|Description|The max direct memory that IoTDB could use|
+|Type|String|
+|Default| Equal to the MAX\_HEAP\_SIZE|
+|Effective|After restarting system|
+
* JMX\_LOCAL
|Name|JMX\_LOCAL|
@@ -74,7 +76,6 @@ The detail of each variables are as follows:
|Default|true|
|Effective|After restarting system|
-
* JMX\_PORT
|Name|JMX\_PORT|
@@ -101,7 +102,159 @@ The user and passwords are in
${IOTDB\_CONF}/conf/jmx.password.
The permission definitions are in ${IOTDB\_CONF}/conf/jmx.access.
-## IoTDB System Configuration File
+## DataNode/Standalone Configuration File (iotdb-datanode.properties)
+
+### Client RPC Service
+
+* rpc\_address
+
+|Name| rpc\_address |
+|:---:|:---|
+|Description| The client rpc service listens on the address.|
+|Type|String|
+|Default| "0.0.0.0" |
+|Effective|After restarting system|
+
+* rpc\_port
+
+|Name| rpc\_port |
+|:---:|:---|
+|Description| The client rpc service listens on the port.|
+|Type|Short Int : [0,65535]|
+|Default| 6667 |
+|Effective|After restarting system|
+
+* rpc\_thrift\_compression\_enable
+
+|Name| rpc\_thrift\_compression\_enable |
+|:---:|:---|
+|Description| Whether enable thrift's compression (using GZIP).|
+|Type|Boolean|
+|Default| false |
+|Effective|After restarting system|
+
+* rpc\_advanced\_compression\_enable
+
+|Name| rpc\_advanced\_compression\_enable |
+|:---:|:---|
+|Description| Whether enable thrift's advanced compression.|
+|Type|Boolean|
+|Default| false |
+|Effective|After restarting system|
+
+* rpc\_max\_concurrent\_client\_num
+
+|Name| rpc\_max\_concurrent\_client\_num |
+|:---:|:---|
+|Description| Max concurrent rpc connections|
+|Type| Short Int : [0,65535] |
+|Description| 65535 |
+|Effective|After restarting system|
+
+* thrift\_max\_frame\_size
+
+|Name| thrift\_max\_frame\_size |
+|:---:|:---|
+|Description| Max size of bytes of each thrift RPC request/response|
+|Type| Long |
+|Unit|Byte|
+|Default| 536870912 |
+|Effective|After restarting system|
+
+* thrift\_init\_buffer\_size
+
+|Name| thrift\_init\_buffer\_size |
+|:---:|:---|
+|Description| Initial size of bytes of buffer that thrift used |
+|Type| long |
+|Default| 1024 |
+|Effective|After restarting system|
+
+### MPP Query Engine
+
+* mpp\_data\_exchange\_port
+
+|Name| mpp\_data\_exchange\_port |
+|:---:|:---|
+|Description| MPP data exchange port |
+|Type| int |
+|Default| 8777 |
+|Effective|After restarting system|
+
+* mpp\_data\_exchange\_core\_pool\_size
+
+|Name| mpp\_data\_exchange\_core\_pool\_size |
+|:---:|:---|
+|Description| Core size of ThreadPool of MPP data exchange|
+|Type| int |
+|Default| 1 |
+|Effective|After restarting system|
+
+* mpp\_data\_exchange\_max\_pool\_size
+
+|Name| mpp\_data\_exchange\_max\_pool\_size |
+|:---:|:---|
+|Description| Max size of ThreadPool of MPP data exchange |
+|Type| int |
+|Default| 5 |
+|Effective|After restarting system|
+
+* mpp\_data\_exchange\_core\_pool\_size=1
+
+|Name| mpp\_data\_exchange\_keep\_alive\_time\_in\_ms |
+|:---:|:---|
+|Description| Max waiting time for MPP data exchange |
+|Type| long |
+|Default| 1000 |
+|Effective|After restarting system|
+
+
+### DataNode Internal Service
+
+* internal\_address
+
+|Name| internal\_address |
+|:---:|:---|
+|Description| DataNode internal service host/IP |
+|Type| string |
+|Default| 127.0.0.1 |
+|Effective|After restarting system|
+
+* internal\_port
+
+|Name| internal\_address |
+|:---:|:---|
+|Description| DataNode internal service port |
+|Type| int |
+|Default| 9003 |
+|Effective|After restarting system|
+
+* data\_region\_consensus\_port
+
+|Name| data\_region\_consensus\_port |
+|:---:|:---|
+|Description| DataNode Data replica communication port for consensus |
+|Type| int |
+|Default| 40010 |
+|Effective|After restarting system|
+
+* schema\_region\_consensus\_port
+
+|Name| schema\_region\_consensus\_port |
+|:---:|:---|
+|Description| DataNode Schema replica communication port for consensus |
+|Type| int |
+|Default| 50010 |
+|Effective|After restarting system|
+
+* config\_nodes
+
+|Name| config\_nodes |
+|:---:|:---|
+|Description| ConfigNode Address for DataNode to join cluster |
+|Type| String |
+|Default| 127.0.0.1:22277 |
+|Effective|After restarting system|
### File Layer
@@ -218,48 +371,11 @@ The permission definitions are in
${IOTDB\_CONF}/conf/jmx.access.
### Engine Layer
-* rpc\_address
-
-|Name| rpc\_address |
-|:---:|:---|
-|Description| The jdbc service listens on the address.|
-|Type|String|
-|Default| "0.0.0.0" |
-|Effective|After restarting system|
-
-* rpc\_port
-
-|Name| rpc\_port |
-|:---:|:---|
-|Description| The jdbc service listens on the port. Please confirm that the
port is not a system reserved port and is not occupied.|
-|Type|Short Int : [0,65535]|
-|Default| 6667 |
-|Effective|After restarting system|
-
-* rpc\_thrift\_compression\_enable
-
-|Name| rpc\_thrift\_compression\_enable |
-|:---:|:---|
-|Description| Whether enable thrift's compression (using GZIP).|
-|Type|Boolean|
-|Default| false |
-|Effective|After restarting system|
-
-* rpc\_advanced\_compression\_enable
-
-|Name| rpc\_advanced\_compression\_enable |
-|:---:|:---|
-|Description| Whether enable thrift's advanced compression.|
-|Type|Boolean|
-|Default| false |
-|Effective|After restarting system|
-
-
* time\_zone
|Name| time\_zone |
|:---:|:---|
-|Description| The time zone in which the server is located, the default is
Beijing time (+8) |
+|Description| The time zone in which the datanode is located, the default is
Beijing time (+8) |
|Type|Time Zone String|
|Default| +08:00 |
|Effective|Trigger|
@@ -1131,14 +1247,14 @@ The permission definitions are in
${IOTDB\_CONF}/conf/jmx.access.
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.
+To enable GC log, just add a parameter "printgc" when you start the DataNode.
```bash
-nohup sbin/start-server.sh printgc >/dev/null 2>&1 &
+nohup sbin/start-datanode.sh printgc >/dev/null 2>&1 &
```
Or
-```bash
-sbin\start-server.bat printgc
+```cmd
+sbin\start-datanode.bat printgc
```
GC log is stored at `IOTDB_HOME/logs/gc.log`.
diff --git a/docs/zh/UserGuide/Cluster/Cluster-Concept.md
b/docs/zh/UserGuide/Cluster/Cluster-Concept.md
new file mode 100644
index 0000000000..82a5670c61
--- /dev/null
+++ b/docs/zh/UserGuide/Cluster/Cluster-Concept.md
@@ -0,0 +1,98 @@
+<!--
+
+```
+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.
+```
+
+-->
+
+## 集群基本概念
+
+Apache IoTDB 集群版包含两种角色的节点,ConfigNode 和 DataNode,分别为不同的进程,可独立部署。
+
+集群架构示例如下图:
+
+<img style="width:100%; max-width:800px; max-height:600px; margin-left:auto;
margin-right:auto; display:block;"
src="https://github.com/apache/iotdb-bin-resources/blob/main/docs/UserGuide/Cluster/Architecture.png?raw=true">
+
+ConfigNode 是集群的控制节点,管理集群的节点状态、分区信息等,集群所有 ConfigNode 组成一个高可用组,数据全量备份。
+
+DataNode 是集群的数据节点,管理多个数据分片、元数据分片,数据即时间序列中的时间戳和值,元数据为时间序列的路径信息、数据类型等。
+
+Client 只能通过 DataNode 进行数据读写。
+
+## 集群特点
+
+* 原生分布式
+ * IoTDB 各模块原生支持分布式。
+ * Standalone 是分布式的一种特殊的部署形态。
+* 扩展性
+ * 支持秒级增加节点,无需进行数据迁移。
+* 大规模并行处理架构 MPP
+ * 采用大规模并行处理架构及火山模型进行数据处理,具有高扩展性。
+* 可根据不同场景需求选择不同的共识协议
+ * 数据副本组和元数据副本组,可以采用 Standalone、多主复制、Raft 中的一种。
+* 可扩展分区策略
+ * 集群采用分区表管理数据和元数据分区,自定义灵活的分配策略。
+* 内置监控框架
+ * 内置集群监控,可以监控集群节点。
+
+## 分区策略
+
+分区策略将数据和元数据划分到不同的 Region 中,并把 Region 分配到不同的 DataNode。
+
+推荐设置 1 个存储组(无需像 0.13 版本根据核数设置存储组),当做 database 概念使用,集群会根据节点数和核数动态分配资源。
+
+存储组包含多个 SchemaRegion(元数据分片) 和 DataRegion(数据分片),由 DataNode 管理。
+
+* 元数据分区策略
+ * 对于一条未使用模板的时间序列的元数据,ConfigNode 会根据设备 ID (从 root
到倒数第二层节点的全路径)映射到一个序列分区槽内,并将此分区槽分配到一个 SchemaRegion 组中。
+
+* 数据分区策略
+ * 对于一个时间序列数据点,ConfigNode 会根据设备 ID
映射到一个序列分区槽内(纵向分区),再根据数据时间戳映射到一个时间分区槽内(横向分区),并将此序列分区槽下的此时间分区槽分配到一个 DataRegion 组中。
+
+IoTDB 使用了基于槽的分区策略,因此分区信息的大小是可控的,不会随时间序列或设备数无限增长。
+
+Region 的多个副本会分配到不同的 DataNode 上,避免单点失效,分配 Region 时会保证不同 DataNode 的负载均衡。
+
+## 复制策略
+
+复制策略将数据复制多份,互为副本,多个副本可以一起提供高可用服务,容忍部分副本失效的情况。
+
+Region 是数据复制的基本单位,一个 Region 的多个副本构成了一个高可用复制组,数据互为备份。
+
+* 集群内的副本组
+ * 分区信息:集群有 1 个分区信息副本组,由所有 ConfigNode 组成。
+ * 数据:集群有多个 DataRegion 副本组,每个 DataRegion 副本组内有多个 id 相同的 DataRegion。
+ * 元数据:集群有多个 SchemaRegion 副本组,每个 SchemaRegion 副本组内有多个 id 相同的 SchemaRegion。
+
+完整的集群分区复制的示意图如下:
+
+<img style="width:100%; max-width:800px; max-height:600px; margin-left:auto;
margin-right:auto; display:block;"
src="https://github.com/apache/iotdb-bin-resources/blob/main/docs/UserGuide/Cluster/Data-Partition.png?raw=true">
+
+图中包含 1 个 SchemaRegion 组,元数据采用 3 副本,因此 3 个白色的 SchemaRegion-0 组成了一个副本组。
+
+图中包含 3 个 DataRegion 组,数据采用 3 副本,因此一共有 9 个 DataRegion。
+
+## 共识协议(一致性协议)
+
+每个副本组的多个副本之间,都通过一个具体的共识协议保证数据一致性,共识协议会将读写请求应用到多个副本上。
+
+* 现有的共识协议
+ * Standalone:仅单副本时可用,一致性协议的空实现,效率最高。
+ * MultiLeader:任意副本数可用,当前仅可用于 DataRegion 的副本上,写入可以在任一副本进行,并异步复制到其他副本。
+ * Ratis:Raft 协议的一种实现,任意副本数可用,当前可用于任意副本组上。
diff --git a/docs/zh/UserGuide/Cluster/Cluster-Setup-Example.md
b/docs/zh/UserGuide/Cluster/Cluster-Setup-Example.md
deleted file mode 100644
index 6bf0499b90..0000000000
--- a/docs/zh/UserGuide/Cluster/Cluster-Setup-Example.md
+++ /dev/null
@@ -1,298 +0,0 @@
-<!--
-
-```
-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.
-```
-
--->
-
-## 前提条件
-
-如果您在使用 Windows 系统,请安装 MinGW,WSL 或者 git bash。
-
-## 1 节点 1 副本分布式搭建示例
-
-### 源码编译:
-
-```
-mvn clean package -DskipTests
-chmod -R 777 ./cluster/target/
-nohup ./cluster/target/iotdb-cluster-0.14.0-SNAPSHOT/sbin/start-node.sh
>/dev/null 2>&1 &
-```
-
-### 使用官网发布版本:
-
-```
-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
-```
-
-**节点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
-```
-
-**节点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
-```
-
-### 源码编译:
-
-```
-mvn clean package -DskipTests
-chmod -R 777 ./cluster/target/
-nohup ./cluster/target/iotdb-cluster-0.14.0-SNAPSHOT/sbin/start-node.sh
./cluster/target/test-classes/node1conf/ >/dev/null 2>&1 &
-nohup ./cluster/target/iotdb-cluster-0.14.0-SNAPSHOT/sbin/start-node.sh
./cluster/target/test-classes/node2conf/ >/dev/null 2>&1 &
-nohup ./cluster/target/iotdb-cluster-0.14.0-SNAPSHOT/sbin/start-node.sh
./cluster/target/test-classes/node3conf/ >/dev/null 2>&1 &
-```
-
-### 使用官网发布版本:
-
-下载发布版本:
-
-```
-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 则两者**设置成一致**即可,只需要保证客户端能够访问到服务端即可。
私网ip对应iotdb-cluster.properties中的`internal_address`配置项,公网ip对应iotdb-engine.properties中的`rpc_address`配置项。
-### 配置
-
-**节点A**:
-
-***iotdb-cluster.properties***
-
-```
-seed_nodes = A_private_Ip:9003,B_private_Ip:9003,C_private_Ip:9003
-default_replica_num = 3
-internal_meta_port = 9003
-internal_data_port = 40010
-internal_address = A_private_Ip
-```
-
-***iotdb-engine.properties***
-
-```
-rpc_port = 6667
-rpc_address = A_public_ip
-```
-
-**节点B**:
-
-***iotdb-cluster.properties***
-
-```
-seed_nodes = A_private_Ip:9003,B_private_Ip:9003,C_private_Ip:9003
-default_replica_num = 3
-internal_meta_port = 9003
-internal_data_port = 40010
-internal_address = B_private_Ip
-```
-
-***iotdb-engine.properties***
-
-```
-rpc_port = 6667
-rpc_address = B_public_ip
-```
-
-**节点C**:
-
-***iotdb-cluster.properties***
-
-```
-seed_nodes = A_private_Ip:9003,B_private_Ip:9003,C_private_Ip:9003
-default_replica_num = 3
-internal_meta_port = 9003
-internal_data_port = 40010
-internal_address = C_private_Ip
-```
-
-***iotdb-engine.properties***
-
-```
-rpc_port = 6667
-rpc_address = 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 即可(后台运行也可)。
-
-
-
-### 源码编译:
-**在三个节点上分别执行操作**
-```
-mvn clean package -DskipTests
-chmod -R 777 ./cluster/target/
-cd cluster/target/iotdb-cluster-0.14.0-SNAPSHOT/
-```
-
-### 使用官网发布版本:
-**在三个节点上分别执行操作**
-
-下载发布版本:
-
-```
-curl -O
https://downloads.apache.org/iotdb/0.12.4/apache-iotdb-0.12.4-cluster-bin.zip
-```
-
-解压压缩包:
-
-```
-unzip apache-iotdb-0.12.4-cluster-bin.zip
-```
-
-进入IoTDB集群根目录:
-
-```
-cd apache-iotdb-0.12.4-cluster-bin
-```
-
-设置 default\_replica\_num = 3: 配置文件中默认为3,无需修改
-
-设置 internal\_ip = 节点的私有ip (以192.168.1.1为例)
-```
-sed -i -e 's/^internal_address=127.0.0.1$/internal_address=192.168.1.1/g'
conf/iotdb-cluster.properties
-```
-设置 seed\_node = A_private_Ip:9003,B_private_Ip:9003,C_private_Ip:9003
(三个节点ip分别为192.168.1.1,192.168.1.2,192.168.1.3为例)
-```
-sed -i -e
's/^seed_nodes=127.0.0.1:9003,127.0.0.1:9005,127.0.0.1:9007$/seed_nodes=192.168.1.1:9003,192.168.1.2:9003,192.168.1.3:9003/g'
conf/iotdb-cluster.properties
-```
-设置 rpc\_address = 节点的公有ip (以192.168.1.1为例)
-```
-sed -i -e 's/^rpc_address=127.0.0.1$/rpc_address=192.168.1.1/g'
conf/iotdb-engine.properties
-```
-**你可以自己修改配置项而不使用“sed”命令**
-
-根据配置文件路径启动三个节点:
-
-```
-nohup ./sbin/start-node.sh >/dev/null 2>&1 &
-```
diff --git a/docs/zh/UserGuide/Cluster/Cluster-Setup.md
b/docs/zh/UserGuide/Cluster/Cluster-Setup.md
index 5d916d2fce..a6503aa7c1 100644
--- a/docs/zh/UserGuide/Cluster/Cluster-Setup.md
+++ b/docs/zh/UserGuide/Cluster/Cluster-Setup.md
@@ -21,23 +21,21 @@
## 集群设置
-你可以根据此文档启动IoTDB集群。
+本文档为 IoTDB 集群版(0.14.0-preview1)启动教程。
## 安装环境
-为使用IoTDB,你首先需要:
-
-1. 安装前需要保证设备上配有 JDK>=1.8 的运行环境,并配置好 JAVA_HOME 环境变量。
+1. JDK>=1.8 的运行环境,并配置好 JAVA_HOME 环境变量。
2. 设置最大文件打开数为 65535。
-## 安装步骤
+3. 关闭交换内存。
+
+## 安装包获取
-IoTDB 支持多种安装途径。用户可以使用三种方式对 IoTDB 进行安装——下载二进制可运行程序、使用源码、使用 docker 镜像。
+### 下载
-- 使用源码:您可以从代码仓库下载源码并编译,具体编译方法见下方。
-- 二进制可运行程序:请从 [下载](https://iotdb.apache.org/Download/) 页面下载最新的安装包,解压后即完成安装。
-- 使用 Docker 镜像:dockerfile 文件位于
https://github.com/apache/iotdb/blob/master/docker/src/main
+可以直接在官网下载二进制版本 [Download Page](https://iotdb.apache.org/Download/)
### 源码编译
@@ -47,345 +45,77 @@ IoTDB 支持多种安装途径。用户可以使用三种方式对 IoTDB 进行
git clone https://github.com/apache/iotdb.git
```
-默认分支为master分支,你可以切换到其他发布版本,例如:
+默认分支为 master 分支,你可以切换到发布版本的 tag,例如:
```
-git checkout rel/0.12
+git checkout v0.14.0-preview1
```
-在iotdb根目录下:
+在 IoTDB 根目录下:
```
-> mvn clean package -pl cluster -am -DskipTests
+mvn clean package -pl distribution -am -DskipTests
```
-集群的二进制版本在目录 **cluster/target/{iotdb-project.version}** 下
-
-### 下载
-
-你可以直接下载二进制版本 [Download Page](https://iotdb.apache.org/Download/)
-
-
-
-## 文件目录
+集群的二进制版本在目录 **distribution/target** 下,其中,all-bin 包含 ConfigNode 和
DataNode,DataNode 内包含 Cli。
-完成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](#集群配置项)。
+| confignode | 包含 ConfigNode 的启停脚本、配置文件、日志、数据 |
+| datanode | 包含 DataNode 的启停脚本、配置文件、日志、数据;Cli的启动脚本 |
+| grafana-metrics-example | Grafana 监控界面模板 |
+| lib | 库文件目录 |
+| tools | 系统工具目录 |
-配置文件位于 **{cluster\_root\_dir}/conf**。
+## 启动集群
-**你需要修改每个节点以下的配置项去启动你的IoTDB集群:**
+用户可以启动包括若干 ConfigNode 和 DataNode 的集群。
+集群可以提供服务的标准是至少启动一个 ConfigNode 且启动 不小于(数据/元数据)副本个数 的 DataNode。
-* iotdb-engine.properties:
+总体启动流程分为三步
- * rpc\_address
+* 启动种子 ConfigNode
+* 增加 ConfigNode(可选)
+* 增加 DataNode
- - 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>]
-```
+### 启动种子 ConfigNode
-`printgc`表示在启动的时候,会开启 GC 日志。 `<conf_path>`使用`conf_path`文件夹里面的配置文件覆盖默认配置文件。GC
日志默认是关闭的。为了性能调优,用户可能会需要收集 GC 信息。GC 日志会被存储在`IOTDB_HOME/logs/`下面。
+启动种子 ConfigNode,iotdb-confignode.properties 中的重要配置如下
-**如果你启动了所有seed节点,并且所有seed节点可以相互通信并没有ip地址/端口和文件目录的冲突,集群就成功启动了。**
-
-### 集群扩展
-
-在集群运行过程中,用户可以向集群中加入新的节点或者删除集群中已有节点。目前仅支持逐节点集群扩展操作,多节点的集群扩展可以转化为一系列单节点集群扩展操作来实现。集群只有在上一次集群扩展操作完成后才会接收新的集群扩展操作。
-
-**在要加入集群的新节点上启动以下脚本进行增加节点操作:**
-
-```
-# 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`文件夹里面的配置文件覆盖默认配置文件。
-
-**在任一集群中的节点上启动以下脚本进行删除节点操作:**
-
-```
-# Unix/OS X
-> sbin/remove-node.sh <internal_address> <internal_meta_port>
-
-# Windows
-> sbin\remove-node.bat <internal_address> <internal_meta_port>
-```
-
-`internal_address`表示待删除节点的 IP 地址 `internal_meta_port`表示待删除节点的 meta 服务端口
-
-### 使用 Cli 工具
-
-安装环境请参考
[快速上手/安装环境章节](https://github.com/apache/iotdb/blob/master/docs/zh/UserGuide/QuickStart/QuickStart.md)。你可以根据节点的rpc\_address和rpc\_port向任何节点发起连接。
-
-### 停止集群
-
-在任一机器上启动以下脚本进行停止所有运行在该机器上的节点服务操作:
-
-```
-# Unix/OS X
-> sbin/stop-node.sh
-
-# Windows
-> sbin\stop-node.bat
-```
-
-
-
-## 附录
-
-### 集群配置项
-
-- internal_address
-
-| 名字 | internal_address
|
-| ------------ | ------------------------------------------------------------ |
-| 描述 | IOTDB 集群各个节点之间内部通信的 IP 地址,比如心跳、snapshot 快照、raft log
等。**`internal_address`是集群内部的私有ip** |
-| 类型 | String |
-| 默认值 | 127.0.0.1 |
-| 改后生效方式 | 重启服务生效,集群建立后不可再修改 |
-
-- internal_meta_port
-
-| 名字 | internal_meta_port |
-| ------------ | ------------------------------------------------------------ |
-| 描述 | IoTDB meta 服务端口,用于元数据组(又称集群管理组)通信,元数据组管理集群配置和存储组信息**IoTDB 将为每个
meta 服务自动创建心跳端口。默认 meta 服务心跳端口为`internal_meta_port+1`,请确认这两个端口不是系统保留端口并且未被占用** |
-| 类型 | Int32 |
-| 默认值 | 9003 |
-| 改后生效方式 | 重启服务生效,集群建立后不可再修改 |
-
-- internal_data_port
+| **配置项** | **说明** |
+| -------- | -------------------------------------------- |
+| rpc\_address | ConfigNode 在集群内部通讯使用的地址 |
+| rpc\_port | ConfigNode 在集群内部通讯使用的端口 |
+| consensus\_port | ConfigNode 副本组共识协议通信使用的端口 |
+| config\_nodes | 种子 ConfigNode 地址,第一个 ConfigNode 配置自己的 address:port
|
+| data\_replication\_factor | 数据副本数,DataNode 数量不应少于此数目 |
+| data\_region\_consensus\_protocol\_class | 数据副本组的共识协议 |
+| schema\_replication\_factor | 元数据副本数,DataNode 数量不应少于此数目 |
+| schema\_region\_consensus\_protocol\_class | 元数据副本组的共识协议 |
-| 名字 | internal_data_port |
-| ------------ | ------------------------------------------------------------ |
-| 描述 | IoTDB data 服务端口,用于数据组通信,数据组管理数据模式和数据的存储**IoTDB 将为每个 data
服务自动创建心跳端口。默认的 data 服务心跳端口为`internal_data_port+1`。请确认这两个端口不是系统保留端口并且未被占用** |
-| 类型 | Int32 |
-| 默认值 | 40010 |
-| 改后生效方式 | 重启服务生效,集群建立后不可再修改 |
+具体参考
[ConfigNode配置参数](https://iotdb.apache.org/zh/UserGuide/Master/Reference/ConfigNode-Config-Manual.html)
-- cluster_info_public_port
+### 增加 ConfigNode(可选)
-| 名字 | cluster_info_public_port |
-| ------------ | ----------------------------------------------- |
-| 描述 | 用于查看集群信息(如数据分区)的 RPC 服务的接口 |
-| 类型 | Int32 |
-| 默认值 | 6567 |
-| 改后生效方式 | 重启服务生效 |
+增加 ConfigNode 是一个扩容操作,除端口不能冲突外,其他参数需要与集群已有的 ConfigNode 保持一致,并将 config\_nodes
配置为集群已有节点。
-- open_server_rpc_port
+### 增加 DataNode
-| 名字 | open_server_rpc_port |
-| ------------ | ------------------------------------------------------------ |
-| 描述 | 是否打开单机模块的 rpc port,用于调试模式,如果设置为 true,则单机模块的 rpc port
设置为`rpc_port (in iotdb-engines.properties) + 1` |
-| 类型 | Boolean |
-| 默认值 | false |
-| 改后生效方式 | 重启服务生效,集群建立后不可再修改 |
-
-- seed_nodes
+可以像集群中添加任意个 DataNode。
-| 名字 | seed_nodes |
-| ------------ | ------------------------------------------------------------ |
-| 描述 |
集群中节点的地址(私有ip),`{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
+iotdb-datanode.properties 中的重要配置如下
-| 名字 | 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 节点间的 thrift 连接超时和 socket 超时时间,单位毫秒. **对于发送心跳和投票请求的 thrift
连接的超时时间会被自动调整为 connection_timeout_ms 和 heartbeat_interval_ms 的最小值.** |
-| 类型 | Int32 |
-| 默认值 | 20000 |
-| 改后生效方式 | 重启服务生效
-
-- heartbeat\_interval\_ms
-
-| 名字 | heartbeat\_interval\_ms |
-| ------------ | ------------------------------------------------------- |
-| 描述 | 领导者发送心跳广播的间隔时间,单位毫秒 |
-| 类型 | Int64 |
-| 默认值 | 1000 |
-| 改后生成方式 | 重启服务生效 |
-
-- election\_timeout\_ms
-
-| 名字 | election\_timeout\_ms |
-| ------------ | ------------------------------------------------------------ |
-| 描述 | 跟随者的选举超时时间, 以及选举者等待投票的超时时间, 单位毫秒 |
-| 类型 | Int64 |
-| 默认值 | 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 |
-| 改后生效方式 | 重启服务生效 |
+| **配置项** | **说明** |
+| -------- | -------------------------------------------- |
+| rpc\_address | 客户端 RPC 服务的地址 |
+| rpc\_port | 客户端 RPC 服务的端口 |
+| internal\_address | DataNode 在集群内部接收控制流使用的端口 |
+| internal\_port | DataNode 在集群内部接收控制流使用的端口 |
+| mpp\_data\_exchange\_port | DataNode 在集群内部接收数据流使用的端口 |
+| data\_region\_consensus\_port | DataNode 的数据副本间共识协议通信的端口 |
+| schema\_region\_consensus\_port | DataNode 的元数据副本间共识协议通信的端口 |
+| config\_nodes | 集群中正在运行的 ConfigNode 地址 |
+
+具体参考
[DataNode配置参数](https://iotdb.apache.org/zh/UserGuide/Master/Reference/DataNode-Config-Manual.html)
\ No newline at end of file
diff --git a/docs/zh/UserGuide/Reference/ConfigNode-Config-Manual.md
b/docs/zh/UserGuide/Reference/ConfigNode-Config-Manual.md
new file mode 100644
index 0000000000..1472e8d1ec
--- /dev/null
+++ b/docs/zh/UserGuide/Reference/ConfigNode-Config-Manual.md
@@ -0,0 +1,278 @@
+<!--
+
+ 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.
+
+-->
+
+# ConfigNode 配置参数
+
+IoTDB ConfigNode 配置文件均位于 IoTDB 安装目录:`confignode/conf`文件夹下。
+
+* `confignode-env.sh/bat`:环境配置项的配置文件,可以配置 ConfigNode 的内存大小。
+
+* `iotdb-confignode.properties`:IoTDB ConfigNode 的配置文件。
+
+## 环境配置项(confignode-env.sh/bat)
+
+环境配置项主要用于对 ConfigNode 运行的 Java 环境相关参数进行配置,如 JVM 相关配置。ConfigNode 启动时,此部分配置会被传给
JVM,详细配置项说明如下:
+
+* MAX\_HEAP\_SIZE
+
+|名字|MAX\_HEAP\_SIZE|
+|:---:|:---|
+|描述|IoTDB 能使用的最大堆内存大小 |
+|类型|String|
+|默认值|取决于操作系统和机器配置。在 Linux 或 MacOS 系统下默认为机器内存的四分之一。在 Windows 系统下,32 位系统的默认值是
512M,64 位系统默认值是 2G。|
+|改后生效方式|重启服务生效|
+
+* HEAP\_NEWSIZE
+
+|名字|HEAP\_NEWSIZE|
+|:---:|:---|
+|描述|IoTDB 启动时分配的最小堆内存大小 |
+|类型|String|
+|默认值|取决于操作系统和机器配置。在 Linux 或 MacOS 系统下默认值为机器 CPU 核数乘以 100M 的值与 MAX\_HEAP\_SIZE
四分之一这二者的最小值。在 Windows 系统下,32 位系统的默认值是 512M,64 位系统默认值是 2G。|
+|改后生效方式|重启服务生效|
+
+* MAX\_DIRECT\_MEMORY\_SIZE
+
+|名字|MAX\_DIRECT\_MEMORY\_SIZE|
+|:---:|:---|
+|描述|IoTDB 能使用的最大堆外内存大小 |
+|类型|String|
+|默认值|默认与最大堆内存相等|
+|改后生效方式|重启服务生效|
+
+
+## 系统配置项(iotdb-confignode.properties)
+
+IoTDB 集群的全局配置通过 ConfigNode 配置。
+
+### Internal RPC Service 配置
+
+* rpc\_address
+
+|名字| rpc\_address |
+|:---:|:---|
+|描述| rpc地址 |
+|类型| String |
+|默认值| 0.0.0.0|
+|改后生效方式|重启服务生效|
+
+* rpc\_port
+
+|名字| rpc\_port |
+|:---:|:---|
+|描述| jdbc 服务监听端口。请确认该端口不是系统保留端口并且未被占用。|
+|类型| Short Int : [0,65535] |
+|默认值| 6667 |
+|改后生效方式|重启服务生效|
+
+* config\_nodes
+
+|名字| config\_nodes |
+|:---:|:---|
+|描述| 目标 ConfigNode 地址,ConfigNode 通过此地址加入集群 |
+|类型| String |
+|默认值| 0.0.0.0:22277 |
+|改后生效方式|重启服务生效|
+
+* rpc\_thrift\_compression\_enable
+
+|名字| rpc\_thrift\_compression\_enable |
+|:---:|:---|
+|描述| 是否启用 thrift 的压缩机制。|
+|类型| Boolean |
+|默认值| false |
+|改后生效方式|重启服务生效|
+
+* rpc\_advanced\_compression\_enable
+
+|名字| rpc\_advanced\_compression\_enable |
+|:---:|:---|
+|描述| 是否启用 thrift 的自定制压缩机制。|
+|类型| Boolean |
+|默认值| false |
+|改后生效方式|重启服务生效|
+
+* rpc\_max\_concurrent\_client\_num
+
+|名字| rpc\_max\_concurrent\_client\_num |
+|:---:|:---|
+|描述| 最大连接数。|
+|类型| Short Int : [0,65535] |
+|默认值| 65535 |
+|改后生效方式|重启服务生效|
+
+* thrift\_max\_frame\_size
+
+|名字| thrift\_max\_frame\_size |
+|:---:|:---|
+|描述| RPC 请求/响应的最大字节数|
+|类型| long |
+|默认值| 536870912 (默认值512MB,应大于等于 512 * 1024 * 1024) |
+|改后生效方式|重启服务生效|
+
+* thrift\_init\_buffer\_size
+
+|名字| thrift\_init\_buffer\_size |
+|:---:|:---|
+|描述| 字节数 |
+|类型| Long |
+|默认值| 1024 |
+|改后生效方式|重启服务生效|
+
+
+### 副本及共识协议
+
+* consensus\_port
+
+|名字| consensus\_port |
+|:---:|:---|
+|描述| ConfigNode 的共识协议通信端口 |
+|类型| Short Int : [0,65535] |
+|默认值| 22278 |
+|改后生效方式|重启服务生效|
+
+
+* data\_replication\_factor
+
+|名字| data\_replication\_factor |
+|:---:|:---|
+|描述| 存储组的默认数据副本数|
+|类型| Int |
+|默认值| 1 |
+|改后生效方式|重启服务生效|
+
+* data\_region\_consensus\_protocol\_class
+
+|名字| data\_region\_consensus\_protocol\_class |
+|:---:|:---|
+|描述| 数据副本的共识协议,1 副本时可以使用 StandAloneConsensus 协议,多副本时可以使用 MultiLeaderConsensus
或 RatisConsensus |
+|类型| String |
+|默认值| org.apache.iotdb.consensus.standalone.StandAloneConsensus |
+|改后生效方式|仅允许在第一次启动服务前修改|
+
+* schema\_replication\_factor
+
+|名字| schema\_replication\_factor |
+|:---:|:---|
+|描述| 存储组的默认元数据副本数 |
+|类型| Int |
+|默认值| 1 |
+|改后生效方式|重启服务生效|
+
+* schema\_region\_consensus\_protocol\_class
+
+|名字| schema\_region\_consensus\_protocol\_class |
+|:---:|:---|
+|描述| 元数据副本的共识协议,1 副本时可以使用 StandAloneConsensus 协议,多副本时只能使用 RatisConsensus |
+|类型| String |
+|默认值| org.apache.iotdb.consensus.standalone.StandAloneConsensus |
+|改后生效方式|仅允许在第一次启动服务前修改|
+
+### 心跳配置
+
+* heartbeat\_interval
+
+|名字| heartbeat\_interval |
+|:---:|:---|
+|描述| 集群节点间的心跳间隔 |
+|类型| Long |
+|单位| ms |
+|默认值| 1000 |
+|改后生效方式|重启服务生效|
+
+
+### 分区配置
+
+* series\_partition\_slot\_num
+
+|名字| series\_partition\_slot\_num |
+|:---:|:---|
+|描述| 序列分区槽数 |
+|类型| Int |
+|默认值| 10000 |
+|改后生效方式|仅允许在第一次启动服务前修改|
+
+* series\_partition\_executor\_class
+
+|名字| series\_partition\_executor\_class |
+|:---:|:---|
+|描述| 序列分区槽数 |
+|类型| String |
+|默认值| org.apache.iotdb.commons.partition.executor.hash.BKDRHashExecutor |
+|改后生效方式|仅允许在第一次启动服务前修改|
+
+### 存储组配置
+
+* default\_ttl
+
+|名字| default\_ttl |
+|:---:|:---|
+|描述| 默认数据保留时间 |
+|类型| Long |
+|默认值| 无限 |
+|改后生效方式|重启服务生效|
+
+* time\_partition\_interval
+
+|名字| time\_partition\_interval |
+|:---:|:---|
+|描述| 存储组默认的数据时间分区间隔 |
+|类型| Long |
+|默认值| 604800 |
+|改后生效方式|仅允许在第一次启动服务前修改|
+
+### 数据目录
+
+* system\_dir
+
+|名字| system\_dir |
+|:---:|:---|
+|描述| ConfigNode 系统数据存储路径 |
+|类型| String |
+|默认值| data/system(Windows:data\\system) |
+|改后生效方式|重启服务生效|
+
+* consensus\_dir
+
+|名字| consensus\_dir |
+|:---:|:---|
+|描述| ConfigNode 共识协议数据存储路径 |
+|类型| String |
+|默认值| data/consensus(Windows:data\\consensus) |
+|改后生效方式|重启服务生效|
+
+* udf\_lib\_dir
+
+|名字| udf\_lib\_dir |
+|:---:|:---|
+|描述| UDF 日志及jar文件存储路径 |
+|类型| String |
+|默认值| ext/udf(Windows:ext\\udf) |
+|改后生效方式|重启服务生效|
+
+* temporary\_lib\_dir
+
+|名字| temporary\_lib\_dir |
+|:---:|:---|
+|描述| UDF jar文件临时存储路径 |
+|类型| String |
+|默认值| ext/temporary(Windows:ext\\temporary) |
+|改后生效方式|重启服务生效|
\ No newline at end of file
diff --git a/docs/zh/UserGuide/Reference/Config-Manual.md
b/docs/zh/UserGuide/Reference/DataNode-Config-Manual.md
similarity index 91%
rename from docs/zh/UserGuide/Reference/Config-Manual.md
rename to docs/zh/UserGuide/Reference/DataNode-Config-Manual.md
index c283408a3e..45066a8270 100644
--- a/docs/zh/UserGuide/Reference/Config-Manual.md
+++ b/docs/zh/UserGuide/Reference/DataNode-Config-Manual.md
@@ -19,33 +19,51 @@
-->
-# 配置参数
+# DataNode/Standalone 配置参数
-为方便 IoTDB Server 的配置与管理,IoTDB Server 为用户提供三种配置项,使得用户可以在启动服务或服务运行时对其进行配置。
+IoTDB DataNode 与 Standalone 模式共用一套配置文件,均位于 IoTDB 安装目录:`datanode/conf`文件夹下。
-三种配置项的配置文件均位于 IoTDB 安装目录:`$IOTDB_HOME/conf`文件夹下,其中涉及 server 配置的共有 2
个文件,分别为:`datanode-env.sh`, `iotdb-datanode.properties`
-。用户可以通过更改其中的配置项对系统运行的相关配置项进行配置。
+* `datanode-env.sh/bat`:环境配置项的配置文件,可以配置 DataNode/Standalone 的内存大小。
-配置文件的说明如下:
-
-* `datanode-env.sh`:环境配置项的默认配置文件。用户可以在文件中配置 JAVA-JVM 的相关系统配置项。
-
-* `iotdb-datanode.properties`:IoTDB 引擎层系统配置项的默认配置文件。用户可以在文件中配置 IoTDB
引擎运行时的相关参数,如 JDBC 服务监听端口 (`rpc_port`)、overflow
- 数据文件存储目录 (`overflow_data_dir`) 等。此外,用户可以在文件中配置 IoTDB 存储时 TsFile
文件的相关信息,如每次将内存中的数据写入到磁盘时的数据大小 (`group_size_in_byte`)
- ,内存中每个列打一次包的大小 (`page_size_in_byte`) 等。
+* `iotdb-datanode.properties`:IoTDB DataNode 和单机版的配置文件。
## 热修改配置项
-为方便用户使用,IoTDB Server
为用户提供了热修改功能,即在系统运行过程中修改`iotdb-datanode.properties`中部分配置参数并即时应用到系统中。下面介绍的参数中,改后
生效方式为`触发生效`
+为方便用户使用,IoTDB 为用户提供了热修改功能,即在系统运行过程中修改 `iotdb-datanode.properties`
中部分配置参数并即时应用到系统中。下面介绍的参数中,改后 生效方式为`触发生效`
的均为支持热修改的配置参数。
-触发方式:客户端发送```load configuration```命令至 IoTDB
-Server,客户端的使用方式详见 [SQL
命令行终端(CLI)](https://iotdb.apache.org/zh/UserGuide/Master/CLI/Command-Line-Interface.html)
+触发方式,通过 Session 或 Cli 发送 ```load configuration``` 命令(SQL)至 IoTDB。
+
+## 环境配置项(datanode-env.sh/bat)
+
+环境配置项主要用于对 DataNode 运行的 Java 环境相关参数进行配置,如 JVM 相关配置。DataNode/Standalone
启动时,此部分配置会被传给 JVM,详细配置项说明如下:
+
+* MAX\_HEAP\_SIZE
+
+|名字|MAX\_HEAP\_SIZE|
+|:---:|:---|
+|描述|IoTDB 能使用的最大堆内存大小 |
+|类型|String|
+|默认值|取决于操作系统和机器配置。在 Linux 或 MacOS 系统下默认为机器内存的四分之一。在 Windows 系统下,32 位系统的默认值是
512M,64 位系统默认值是 2G。|
+|改后生效方式|重启服务生效|
+
+* HEAP\_NEWSIZE
-## 环境配置项
+|名字|HEAP\_NEWSIZE|
+|:---:|:---|
+|描述|IoTDB 启动时分配的最小堆内存大小 |
+|类型|String|
+|默认值|取决于操作系统和机器配置。在 Linux 或 MacOS 系统下默认值为机器 CPU 核数乘以 100M 的值与 MAX\_HEAP\_SIZE
四分之一这二者的最小值。在 Windows 系统下,32 位系统的默认值是 512M,64 位系统默认值是 2G。|
+|改后生效方式|重启服务生效|
+
+* MAX\_DIRECT\_MEMORY\_SIZE
-环境配置项主要用于对 IoTDB Server 运行的 Java 环境相关参数进行配置,如 JVM 相关配置。IoTDB Server
启动时,此部分配置会被传给 JVM。用户可以通过查看 `datanode-env.sh`
-(或`datanode-env.bat`) 文件查看环境配置项内容。详细配置项说明如下:
+|名字|MAX\_DIRECT\_MEMORY\_SIZE|
+|:---:|:---|
+|描述|IoTDB 能使用的最大堆外内存大小 |
+|类型|String|
+|默认值|默认与最大堆内存相等|
+|改后生效方式|重启服务生效|
* JMX\_LOCAL
@@ -65,30 +83,11 @@ Server,客户端的使用方式详见 [SQL 命令行终端(CLI)](https://i
|默认值|31999|
|改后生效方式|重启服务生效|
-* MAX\_HEAP\_SIZE
-
-|名字|MAX\_HEAP\_SIZE|
-|:---:|:---|
-|描述|IoTDB 启动时能使用的最大堆内存大小。|
-|类型|String|
-|默认值|取决于操作系统和机器配置。在 Linux 或 MacOS 系统下默认为机器内存的四分之一。在 Windows 系统下,32 位系统的默认值是
512M,64 位系统默认值是 2G。|
-|改后生效方式|重启服务生效|
-
-* HEAP\_NEWSIZE
-
-|名字|HEAP\_NEWSIZE|
-|:---:|:---|
-|描述|IoTDB 启动时能使用的最小堆内存大小。|
-|类型|String|
-|默认值|取决于操作系统和机器配置。在 Linux 或 MacOS 系统下默认值为机器 CPU 核数乘以 100M 的值与 MAX\_HEAP\_SIZE
四分之一这二者的最小值。在 Windows 系统下,32 位系统的默认值是 512M,64 位系统默认值是 2G。|
-|改后生效方式|重启服务生效|
-
-## 系统配置项
+## 系统配置项(iotdb-datanode.properties)
-系统配置项是 IoTDB Server 运行的核心配置,它主要用于设置 IoTDB Server 文件层和引擎层的参数,便于用户根据自身需求调整 Server
-的相关配置,以达到较好的性能表现。系统配置项可分为两大模块:文件层配置项和引擎层配置项。用户可以通过`iotdb-datanode.properties`,
文件查看和修改两种配置项的内容。在 0.7.0 版本中字符串类型的配置项大小写敏感。
+系统配置项是 IoTDB DataNode/Standalone 运行的核心配置,它主要用于设置 DataNode/Standalone 数据库引擎的参数。
-### RPC配置
+### 客户端 RPC 服务配置
* rpc\_address
@@ -103,7 +102,7 @@ Server,客户端的使用方式详见 [SQL 命令行终端(CLI)](https://i
|名字| rpc\_port |
|:---:|:---|
-|描述| jdbc 服务监听端口。请确认该端口不是系统保留端口并且未被占用。|
+|描述| Client RPC 服务监听端口。|
|类型| Short Int : [0,65535] |
|默认值| 6667 |
|改后生效方式|重启服务生效|
@@ -153,6 +152,92 @@ Server,客户端的使用方式详见 [SQL 命令行终端(CLI)](https://i
|默认值| 1024 |
|改后生效方式|重启服务生效|
+### MPP 查询引擎参数
+
+* mpp\_data\_exchange\_port
+
+|名字| mpp\_data\_exchange\_port |
+|:---:|:---|
+|描述| MPP 数据交换端口 |
+|类型| int |
+|默认值| 8777 |
+|改后生效方式|重启服务生效|
+
+* mpp\_data\_exchange\_core\_pool\_size
+
+|名字| mpp\_data\_exchange\_core\_pool\_size |
+|:---:|:---|
+|描述| MPP 数据交换线程池核心线程数 |
+|类型| int |
+|默认值| 1 |
+|改后生效方式|重启服务生效|
+
+* mpp\_data\_exchange\_max\_pool\_size
+
+|名字| mpp\_data\_exchange\_max\_pool\_size |
+|:---:|:---|
+|描述| MPP 数据交换线程池最大线程数 |
+|类型| int |
+|默认值| 5 |
+|改后生效方式|重启服务生效|
+
+* mpp\_data\_exchange\_core\_pool\_size
+
+|名字| mpp\_data\_exchange\_keep\_alive\_time\_in\_ms |
+|:---:|:---|
+|描述| MPP 数据交换最大等待时间 |
+|类型| long |
+|默认值| 1000 |
+|改后生效方式|重启服务生效|
+
+
+### DataNode 内部服务参数
+
+* internal\_address
+
+|名字| internal\_address |
+|:---:|:---|
+|描述| DataNode 内网通信地址 |
+|类型| string |
+|默认值| 127.0.0.1 |
+|改后生效方式|重启服务生效|
+
+* internal\_port
+
+|名字| internal\_address |
+|:---:|:---|
+|描述| DataNode 内网通信端口 |
+|类型| int |
+|默认值| 9003 |
+|改后生效方式|重启服务生效|
+
+* data\_region\_consensus\_port
+
+|名字| data\_region\_consensus\_port |
+|:---:|:---|
+|描述| DataNode 数据副本的共识协议通信端口 |
+|类型| int |
+|默认值| 40010 |
+|改后生效方式|重启服务生效|
+
+* schema\_region\_consensus\_port
+
+|名字| schema\_region\_consensus\_port |
+|:---:|:---|
+|描述| DataNode 元数据副本的共识协议通信端口 |
+|类型| int |
+|默认值| 50010 |
+|改后生效方式|重启服务生效|
+
+* config\_nodes
+
+|名字| config\_nodes |
+|:---:|:---|
+|描述| ConfigNode 地址,DataNode 启动时通过此地址加入集群 |
+|类型| String |
+|默认值| 127.0.0.1:22277 |
+|改后生效方式|重启服务生效|
+
### InfluxDB 协议适配器配置
* enable_influxdb_rpc_service
@@ -169,9 +254,10 @@ Server,客户端的使用方式详见 [SQL 命令行终端(CLI)](https://i
| 名字 | influxdb_rpc_port |
| :----------: | :--------------------------- |
| 描述 | influxdb rpc service占用端口 |
-| 类型 | INT32 |
+| 类型 | int |
| 默认值 | 8086 |
| 改后生效方式 | 重启服务生效 |
+
### 写前日志配置
* enable\_wal
@@ -197,7 +283,7 @@ Server,客户端的使用方式详见 [SQL 命令行终端(CLI)](https://i
|名字| flush\_wal\_threshold |
|:---:|:---|
|描述| 写前日志的条数达到该值之后,持久化到磁盘,有可能丢失至多 flush\_wal\_threshold 个操作 |
-|类型| Int32 |
+|类型| int |
|默认值| 10000 |
|改后生效方式|触发生效|
@@ -206,7 +292,7 @@ Server,客户端的使用方式详见 [SQL 命令行终端(CLI)](https://i
|名字| force\_wal\_period\_in\_ms |
|:---:|:---|
|描述| 写前日志定期持久化到磁盘的周期,单位毫秒,有可能丢失至多 force\_wal\_period\_in\_ms 毫秒的操作。 |
-|类型| Int32 |
+|类型| int |
|默认值| 100 |
|改后生效方式|触发生效|
@@ -254,7 +340,7 @@ Server,客户端的使用方式详见 [SQL 命令行终端(CLI)](https://i
|名字| multi\_dir\_strategy |
|:---:|:---|
-|描述| IoTDB 在 tsfile\_dir 中为 TsFile 选择目录时采用的策略。可使用简单类名或类名全称。系统提供以下三种策略:<br>1.
SequenceStrategy:IoTDB 按顺序从 tsfile\_dir 中选择目录,依次遍历 tsfile\_dir
中的所有目录,并不断轮循;<br>2. MaxDiskUsableSpaceFirstStrategy:IoTDB 优先选择 tsfile\_dir
中对应磁盘空余空间最大的目录;<br>3. MinFolderOccupiedSpaceFirstStrategy:IoTDB 优先选择
tsfile\_dir 中已使用空间最小的目录;<br>4.
UserDfineStrategyPackage(用户自定义策略)<br>您可以通过以下方法完成用户自定义策略:<br>1. 继承
cn.edu.tsinghua.iotdb.conf.directories.strategy.DirectoryStrategy 类并实现自身的
Strategy 方法;<br>2. 将实现的类的完整类名(包名加类名,U [...]
+|描述| IoTDB 在 data\_dirs 中为 TsFile 选择目录时采用的策略。可使用简单类名或类名全称。系统提供以下三种策略:<br>1.
SequenceStrategy:IoTDB 按顺序选择目录,依次遍历 data\_dirs 中的所有目录,并不断轮循;<br>2.
MaxDiskUsableSpaceFirstStrategy:IoTDB 优先选择 data\_dirs 中对应磁盘空余空间最大的目录;<br>3.
MinFolderOccupiedSpaceFirstStrategy:IoTDB 优先选择 data\_dirs 中已使用空间最小的目录;<br>4.
UserDefineStrategyPackage(用户自定义策略)<br>您可以通过以下方法完成用户自定义策略:<br>1. 继承
org.apache.iotdb.db.conf.directories.strategy 类并实现自身的 Strategy 方法;<br>2.
将实现的类的完整类名(包名加类名,UserDefineStrategyPackage)填写到该配置项;<br>3 [...]
|类型| String |
|默认值| MaxDiskUsableSpaceFirstStrategy |
|改后生效方式|触发生效|
@@ -1712,13 +1798,13 @@ GC 日志默认是关闭的。为了性能调优,用户可能会需要收集 G
若要打开 GC 日志,则需要在启动 IoTDB Server 的时候加上"printgc"参数:
```bash
-nohup sbin/start-server.sh printgc >/dev/null 2>&1 &
+nohup sbin/start-datanode.sh printgc >/dev/null 2>&1 &
```
或者
```bash
-sbin\start-server.bat printgc
+sbin\start-datanode.bat printgc
```
GC 日志会被存储在`IOTDB_HOME/logs/gc.log`. 至多会存储 10 个 gc.log 文件,每个文件最多 10MB。
diff --git a/site/src/main/.vuepress/config.js
b/site/src/main/.vuepress/config.js
index 1c35abad01..7687757aa0 100644
--- a/site/src/main/.vuepress/config.js
+++ b/site/src/main/.vuepress/config.js
@@ -973,8 +973,8 @@ var config = {
{
title: 'Cluster Setup',
children: [
-
['Cluster/Cluster-Setup','Cluster Setup'],
-
['Cluster/Cluster-Setup-Example','Cluster Setup Example']
+
['Cluster/Cluster-Concept','Cluster Concept'],
+
['Cluster/Cluster-Setup','Cluster Setup']
]
},
{
@@ -996,7 +996,8 @@ var config = {
{
title: 'Reference',
children: [
-
['Reference/Config-Manual','Config Manual'],
+
['Reference/ConfigNode-Config-Manual','ConfigNode Config Manual'],
+
['Reference/DataNode-Config-Manual','DataNode Config Manual'],
['Reference/Keywords','Keywords'],
['Reference/Frequently-asked-questions','Frequently asked questions'],
['Reference/TSDB-Comparison','TSDB Comparison']
@@ -1896,8 +1897,8 @@ var config = {
{
title: '集群搭建',
children: [
-
['Cluster/Cluster-Setup','集群搭建'],
-
['Cluster/Cluster-Setup-Example','集群搭建示例']
+
['Cluster/Cluster-Concept','集群基本概念'],
+
['Cluster/Cluster-Setup','集群搭建']
]
},
{
@@ -1919,7 +1920,8 @@ var config = {
{
title: '参考',
children: [
-
['Reference/Config-Manual','配置参数'],
+
['Reference/ConfigNode-Config-Manual','ConfigNode配置参数'],
+
['Reference/DataNode-Config-Manual','DataNode配置参数'],
['Reference/Keywords','关键字'],
['Reference/Frequently-asked-questions','常见问题'],
['Reference/TSDB-Comparison','时间序列数据库比较']