ConfigNode is the control node of the cluster, which manages the node status of cluster, partition information, etc. All ConfigNodes in the cluster form a highly available group, which is fully replicated.
ConfigNode is the control node of the cluster, which manages the cluster's node status, partition information, etc. All ConfigNodes in the cluster form a highly available group, which is fully replicated.
DataNode stores the data and schema of cluster, which manages multiple data regions and schema regions. Data is a time-value pair, and schema is the path and data type of each time series.
DataNode stores the data and schema of the cluster, which manages multiple data regions and schema regions. Data is a time-value pair, and schema is the path and data type of each time series.
Client could only connect to the DataNode for operation.
...
...
@@ -39,16 +39,16 @@ Client could only connect to the DataNode for operation.
| ConfigNode | node role | Configuration node, which manages cluster node information and partition information, monitors cluster status, controls load balancing |
| ConfigNode | node role | Configuration node, which manages cluster node information and partition information, monitors cluster status and controls load balancing |
| DataNode | node role | Data node, which manages data and meta data |
| Database | meta data | Database, data are isolated physically from different databases |
| DeviceId | device id | The full path from root to the penultimate level in the metadata tree represents a device id |
| SeriesSlot | schema partition | Each database contains many SeriesSlot, the partition key is DeviceId |
| SeriesSlot | schema partition | Each database contains many SeriesSlots, the partition key being DeviceId |
| SchemaRegion | schema region | A collection of multiple SeriesSlots |
| SchemaRegionGroup | logical concept | The number of SchemaRegions contained in group is the number of schema replication, it manages the same schema data, and back up each other |
| SeriesTimeSlot | data partition | The data of a time interval of SeriesSlot, a SeriesSlot contains multiple SeriesTimeSlots, the partition key is timestamp |
| SchemaRegionGroup | logical concept | The number of SchemaRegions contained in group is the number of schema replicas, it manages the same schema data, and back up each other |
| SeriesTimeSlot | data partition | The data of a time interval of SeriesSlot, a SeriesSlot contains multiple SeriesTimeSlots, the partition key being timestamp |
| DataRegion | data region | A collection of multiple SeriesTimeSlots |
| DataRegionGroup | logical concept | The number of DataRegions contained in group is the number of data replication, it manages the same data, and back up each other |
| DataRegionGroup | logical concept | The number of DataRegions contained in group is the number of data replicas, it manages the same data, and back up each other |
## Characteristics of Cluster
...
...
@@ -87,7 +87,7 @@ Regions will be allocated to different DataNodes to avoid single point of failur
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 RegionGroup, to support high availability.
A region is the basic unit of replication. Multiple replicas of a region construct a high-availability RegionGroup.
* Replication and consensus
* ConfigNode Group: Consisting of all ConfigNodes.
Execute the remove-datanode shell on an active, and make sure that there are no less than the number of data/schema_replication_factor DataNodes in Cluster after removing.
Execute the remove-datanode shell on an active DataNode, and make sure that the number of active DataNodes are no less than the number of data/schema_replication_factor in Cluster after removing.
@@ -28,38 +28,40 @@ IoTDB provides Cli/shell tools for users to interact with IoTDB server in comman
## Installation
Under the root path of iotdb:
If you use the source code version of IoTDB, then under the root path of IoTDB, execute:
```shell
> mvn clean package -pl cli -am-DskipTests
```
After build, the IoTDB cli will be in the folder "cli/target/iotdb-cli-{project.version}".
After build, the IoTDB Cli will be in the folder "cli/target/iotdb-cli-{project.version}".
If you download the binary version, then the Cli can be used directly in sbin folder.
## Running
### Running Cli
After installation, there is a default user in IoTDB: `root`, and the
default password is `root`. Users can use this username to try IoTDB Cli/Shell tool. The cli startup script is the `start-cli` file under the \$IOTDB\_HOME/bin folder. When starting the script, you need to specify the IP and PORT. (Make sure the IoTDB server is running properly when you use Cli/Shell tool to connect it.)
default password is `root`. Users can use this username to try IoTDB Cli/Shell tool. The cli startup script is the `start-cli` file under the \$IOTDB\_HOME/bin folder. When starting the script, you need to specify the IP and PORT. (Make sure the IoTDB cluster is running properly when you use Cli/Shell tool to connect to it.)
Here is an example where the server is started locally and the user has not changed the running port. The default rpc port is
Here is an example where the cluster is started locally and the user has not changed the running port. The default rpc port is
6667 </br>
If you need to connect to the remote server or changes
the rpc port number of the server running, set the specific IP and RPC PORT at -h and -p.</br>
If you need to connect to the remote DataNode or changes
the rpc port number of the DataNode running, set the specific IP and RPC PORT at -h and -p.</br>
You also can set your own environment variable at the front of the start script ("/sbin/start-cli.sh" for linux and "/sbin/start-cli.bat" for windows)
The Linux and MacOS system startup commands are as follows:
@@ -121,7 +124,7 @@ Special commands of Cli are below.
Openid connect (oidc) uses keycloack as the authority authentication service of oidc service
#### configuration
#### Configuration
The configuration is located in iotdb-datanode.properties(iotdb-confignode.properties) , set the author_provider_class is org.apache.iotdb.db.auth.authorizer.OpenIdAuthorizer Openid service is enabled, and the default value is org.apache.iotdb.db.auth.authorizer.LocalFileAuthorizer Indicates that the openid service is not enabled.
Among them, you need to replace {my access token} (note, including {}) with your token, that is, the value corresponding to access_token.
...
...
@@ -224,14 +227,14 @@ This has to be passed as username (with parameter `-u`) and empty password to th
-e parameter is designed for the Cli/shell tool in the situation where you would like to manipulate IoTDB in batches through scripts. By using the -e parameter, you can operate IoTDB without entering the cli's input mode.
In order to avoid confusion between statements and other parameters, the current situation only supports the -e parameter as the last parameter.
In order to avoid confusion between statements and other parameters, the current version only supports the -e parameter as the last parameter.
The usage of -e parameter for Cli/shell is as follows:
The Linux and MacOS system commands:
```shell
Shell > sbin/start-cli.sh -h{host}-p{rpcPort}-u{user}-pw{password}-e{sql for iotdb}
Shell >bash sbin/start-cli.sh -h{host}-p{rpcPort}-u{user}-pw{password}-e{sql for iotdb}