You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ca...@apache.org on 2022/09/27 15:40:50 UTC
[iotdb] branch master updated: [IOTDB-4523] Update docs of show regions #7458 (#7458)
This is an automated email from the ASF dual-hosted git repository.
caogaofei 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 58a5ccc912 [IOTDB-4523] Update docs of show regions #7458 (#7458)
58a5ccc912 is described below
commit 58a5ccc91217f4ba06e9e1bc3ebc15e2400312fa
Author: YongzaoDan <33...@users.noreply.github.com>
AuthorDate: Tue Sep 27 23:40:43 2022 +0800
[IOTDB-4523] Update docs of show regions #7458 (#7458)
---
.../Maintenance-Tools/Maintenance-Command.md | 202 +++++++++++----------
.../Maintenance-Tools/Maintenance-Command.md | 198 ++++++++++----------
2 files changed, 214 insertions(+), 186 deletions(-)
diff --git a/docs/UserGuide/Maintenance-Tools/Maintenance-Command.md b/docs/UserGuide/Maintenance-Tools/Maintenance-Command.md
index 3d200fd07e..a6b4c6d80d 100644
--- a/docs/UserGuide/Maintenance-Tools/Maintenance-Command.md
+++ b/docs/UserGuide/Maintenance-Tools/Maintenance-Command.md
@@ -279,115 +279,129 @@ A cluster uses a Region as a unit for data replication and data management . The
Currently, IoTDB supports Region query using the following SQL:
-- `SHOW REGIONS`: Show all Region
-- `SHOW SCHEMA REGIONS`: Show all SchemaRegion distribution
-- `SHOW DATA REGIONS`: Show all DataRegion distribution
-- `SHOW (DATA|SCHEMA)? REGIONS OF STORAGE GROUP <sg1,sg2,...>`: Show region distribution of specified storage groups
+- `SHOW REGIONS`: Show distribution of all Regions
+- `SHOW SCHEMA REGIONS`: Show distribution of all SchemaRegions
+- `SHOW DATA REGIONS`: Show distribution of all DataRegions
+- `SHOW (DATA|SCHEMA)? REGIONS OF STORAGE GROUP <sg1,sg2,...>`: Show Region distribution of specified StorageGroups
-First, let's take a look at the distribution of Regions under three copies:
-
-```
-IoTDB> create timeseries root.sg.d1.s1 with datatype=BOOLEAN,encoding=PLAIN
-Msg: The statement is executed successfully.
-IoTDB> create timeseries root.sg.d2.s1 with datatype=BOOLEAN,encoding=PLAIN
-Msg: The statement is executed successfully.
-IoTDB> create timeseries root.ln.d1.s1 with datatype=BOOLEAN,encoding=PLAIN
-Msg: The statement is executed successfully.
-
-+--------+------------+------+-------------+------------+----------+----------+---------+-------+--------+
-|RegionId| Type|Status|storage group|Series Slots|Time Slots|DataNodeId| Host|RpcPort| Role|
-+--------+------------+------+-------------+------------+----------+----------+---------+-------+--------+
-| 0|SchemaRegion| Up| root.sg| 2| 0| 5|127.0.0.1| 6671|Follower|
-| 0|SchemaRegion| Up| root.sg| 2| 0| 4|127.0.0.1| 6669|Follower|
-| 0|SchemaRegion| Up| root.sg| 2| 0| 3|127.0.0.1| 6667| Leader|
-| 1|SchemaRegion| Up| root.ln| 1| 0| 5|127.0.0.1| 6671|Follower|
-| 1|SchemaRegion| Up| root.ln| 1| 0| 4|127.0.0.1| 6669|Follower|
-| 1|SchemaRegion| Up| root.ln| 1| 0| 3|127.0.0.1| 6667| Leader|
-+--------+------------+------+-------------+------------+----------+----------+---------+-------+--------+
-Total line number = 6
-It costs 0.032s
+Show distribution of all Regions:
```
-
-Then take a look at the distribution of Regions under a single copy:
-
-
-```sql
IoTDB> show regions
-+--------+------------+------+-------------+------------+----------+----------+---------+-------+------+
-|RegionId| Type|Status|storage group|Series Slots|Time Slots|DataNodeId| Host|RpcPort| Role|
-+--------+------------+------+-------------+------------+----------+----------+---------+-------+------+
-| 0|SchemaRegion| Up| root.sg| 2| 0| 5|127.0.0.1| 6671|Leader|
-| 1|SchemaRegion| Up| root.ln| 1| 0| 4|127.0.0.1| 6669|Leader|
-+--------+------------+------+-------------+------------+----------+----------+---------+-------+------+
-Total line number = 2
-It costs 0.128s
++--------+------------+-------+-------------+-----------+---------+----------+-------+-------+--------+
+|RegionId| Type| Status|Storage Group|SeriesSlots|TimeSlots|DataNodeId| Host|RpcPort| Role|
++--------+------------+-------+-------------+-----------+---------+----------+-------+-------+--------+
+| 0| DataRegion|Running| root.sg1| 1| 1| 1|0.0.0.0| 6667|Follower|
+| 0| DataRegion|Running| root.sg1| 1| 1| 2|0.0.0.0| 6668| Leader|
+| 0| DataRegion|Running| root.sg1| 1| 1| 3|0.0.0.0| 6669|Follower|
+| 1|SchemaRegion|Running| root.sg1| 1| 0| 1|0.0.0.0| 6667|Follower|
+| 1|SchemaRegion|Running| root.sg1| 1| 0| 2|0.0.0.0| 6668|Follower|
+| 1|SchemaRegion|Running| root.sg1| 1| 0| 3|0.0.0.0| 6669| Leader|
+| 2| DataRegion|Running| root.sg2| 1| 1| 1|0.0.0.0| 6667| Leader|
+| 2| DataRegion|Running| root.sg2| 1| 1| 2|0.0.0.0| 6668|Follower|
+| 2| DataRegion|Running| root.sg2| 1| 1| 3|0.0.0.0| 6669|Follower|
+| 3|SchemaRegion|Running| root.sg2| 1| 0| 1|0.0.0.0| 6667|Follower|
+| 3|SchemaRegion|Running| root.sg2| 1| 0| 2|0.0.0.0| 6668| Leader|
+| 3|SchemaRegion|Running| root.sg2| 1| 0| 3|0.0.0.0| 6669|Follower|
++--------+------------+-------+-------------+-----------+---------+----------+-------+-------+--------+
+Total line number = 12
+It costs 0.165s
```
-Show the distribution information of Schema Region and Data Region:
-
+Show the distribution of SchemaRegions or DataRegions:
```
-IoTDB> insert into root.sg.d1(timestamp,s1) values(1,true)
-Msg: The statement is executed successfully.
-IoTDB> insert into root.ln.d1(timestamp,s1) values(1,true)
-Msg: The statement is executed successfully.
-
IoTDB> show data regions
-+--------+----------+------+-------------+------------+----------+----------+---------+-------+--------+
-|RegionId| Type|Status|storage group|Series Slots|Time Slots|DataNodeId| Host|RpcPort| Role|
-+--------+----------+------+-------------+------------+----------+----------+---------+-------+--------+
-| 2|DataRegion| Up| root.sg| 1| 1| 5|127.0.0.1| 6671|Follower|
-| 2|DataRegion| Up| root.sg| 1| 1| 4|127.0.0.1| 6669| Leader|
-| 2|DataRegion| Up| root.sg| 1| 1| 3|127.0.0.1| 6667|Follower|
-| 3|DataRegion| Up| root.ln| 1| 1| 5|127.0.0.1| 6671| Leader|
-| 3|DataRegion| Up| root.ln| 1| 1| 4|127.0.0.1| 6669|Follower|
-| 3|DataRegion| Up| root.ln| 1| 1| 3|127.0.0.1| 6667|Follower|
-+--------+----------+------+-------------+------------+----------+----------+---------+-------+--------+
-Total line number = 2
++--------+------------+-------+-------------+-----------+---------+----------+-------+-------+--------+
+|RegionId| Type| Status|Storage Group|SeriesSlots|TimeSlots|DataNodeId| Host|RpcPort| Role|
++--------+------------+-------+-------------+-----------+---------+----------+-------+-------+--------+
+| 0| DataRegion|Running| root.sg1| 1| 1| 1|0.0.0.0| 6667|Follower|
+| 0| DataRegion|Running| root.sg1| 1| 1| 2|0.0.0.0| 6668| Leader|
+| 0| DataRegion|Running| root.sg1| 1| 1| 3|0.0.0.0| 6669|Follower|
+| 2| DataRegion|Running| root.sg2| 1| 1| 1|0.0.0.0| 6667| Leader|
+| 2| DataRegion|Running| root.sg2| 1| 1| 2|0.0.0.0| 6668|Follower|
+| 2| DataRegion|Running| root.sg2| 1| 1| 3|0.0.0.0| 6669|Follower|
++--------+------------+-------+-------------+-----------+---------+----------+-------+-------+--------+
+Total line number = 6
It costs 0.011s
+
IoTDB> show schema regions
-+--------+------------+------+-------------+------------+----------+----------+---------+-------+--------+
-|RegionId| Type|Status|storage group|Series Slots|Time Slots|DataNodeId| Host|RpcPort| Role|
-+--------+------------+------+-------------+------------+----------+----------+---------+-------+--------+
-| 0|SchemaRegion| Up| root.sg| 2| 0| 5|127.0.0.1| 6671|Follower|
-| 0|SchemaRegion| Up| root.sg| 2| 0| 4|127.0.0.1| 6669| Leader|
-| 0|SchemaRegion| Up| root.sg| 2| 0| 3|127.0.0.1| 6667|Follower|
-| 1|SchemaRegion| Up| root.ln| 1| 0| 5|127.0.0.1| 6671|Follower|
-| 1|SchemaRegion| Up| root.ln| 1| 0| 4|127.0.0.1| 6669|Follower|
-| 1|SchemaRegion| Up| root.ln| 1| 0| 3|127.0.0.1| 6667| Leader|
-+--------+------------+------+-------------+------------+----------+----------+---------+-------+--------+
-Total line number = 2
++--------+------------+-------+-------------+-----------+---------+----------+-------+-------+--------+
+|RegionId| Type| Status|Storage Group|SeriesSlots|TimeSlots|DataNodeId| Host|RpcPort| Role|
++--------+------------+-------+-------------+-----------+---------+----------+-------+-------+--------+
+| 1|SchemaRegion|Running| root.sg1| 1| 0| 1|0.0.0.0| 6667|Follower|
+| 1|SchemaRegion|Running| root.sg1| 1| 0| 2|0.0.0.0| 6668|Follower|
+| 1|SchemaRegion|Running| root.sg1| 1| 0| 3|0.0.0.0| 6669| Leader|
+| 3|SchemaRegion|Running| root.sg2| 1| 0| 1|0.0.0.0| 6667|Follower|
+| 3|SchemaRegion|Running| root.sg2| 1| 0| 2|0.0.0.0| 6668| Leader|
+| 3|SchemaRegion|Running| root.sg2| 1| 0| 3|0.0.0.0| 6669|Follower|
++--------+------------+-------+-------------+-----------+---------+----------+-------+-------+--------+
+Total line number = 6
It costs 0.012s
```
-Show region distribution of specified storage groups
+Show Region distribution of specified StorageGroups:
```
-IoTDB> show regions of storage group root.sg
-+--------+------------+------+-------------+------------+----------+----------+---------+-------+--------+
-|RegionId| Type|Status|storage group|Series Slots|Time Slots|DataNodeId| Host|RpcPort| Role|
-+--------+------------+------+-------------+------------+----------+----------+---------+-------+--------+
-| 0|SchemaRegion| Up| root.sg| 2| 0| 5|127.0.0.1| 6671|Follower|
-| 0|SchemaRegion| Up| root.sg| 2| 0| 4|127.0.0.1| 6669| Leader|
-| 0|SchemaRegion| Up| root.sg| 2| 0| 3|127.0.0.1| 6667|Follower|
-| 2| DataRegion| Up| root.sg| 1| 1| 5|127.0.0.1| 6671|Follower|
-| 2| DataRegion| Up| root.sg| 1| 1| 4|127.0.0.1| 6669| Leader|
-| 2| DataRegion| Up| root.sg| 1| 1| 3|127.0.0.1| 6667|Follower|
-+--------+------------+------+-------------+------------+----------+----------+---------+-------+--------+
-Total line number = 2
-It costs 0.005s
+IoTDB> show regions of storage group root.sg1
++--------+------------+-------+-------------+-----------+---------+----------+-------+-------+--------+
+|RegionId| Type| Status|Storage Group|SeriesSlots|TimeSlots|DataNodeId| Host|RpcPort| Role|
++--------+------------+-------+-------------+-----------+---------+----------+-------+-------+--------+
+| 0| DataRegion|Running| root.sg1| 1| 1| 1|0.0.0.0| 6667|Follower|
+| 0| DataRegion|Running| root.sg1| 1| 1| 2|0.0.0.0| 6668| Leader|
+| 0| DataRegion|Running| root.sg1| 1| 1| 3|0.0.0.0| 6669|Follower|
+| 1|SchemaRegion|Running| root.sg1| 1| 0| 1|0.0.0.0| 6667|Follower|
+| 1|SchemaRegion|Running| root.sg1| 1| 0| 2|0.0.0.0| 6668|Follower|
+| 1|SchemaRegion|Running| root.sg1| 1| 0| 3|0.0.0.0| 6669| Leader|
++--------+------------+-------+-------------+-----------+---------+----------+-------+-------+--------+
+Total line number = 6
+It costs 0.007s
-IoTDB> create timeseries root.sgcc.wf01.d1.wt01 with datatype=BOOLEAN,encoding=PLAIN
-Msg: The statement is executed successfully.
-IoTDB> show regions of storage group root.*.wf01
-+--------+------------+------+--------------+------------+----------+----------+---------+-------+--------+
-|RegionId| Type|Status| storage group|Series Slots|Time Slots|DataNodeId| Host|RpcPort| Role|
-+--------+------------+------+--------------+------------+----------+----------+---------+-------+--------+
-| 4|SchemaRegion| Up|root.sgcc.wf01| 1| 0| 5|127.0.0.1| 6671| Leader|
-| 4|SchemaRegion| Up|root.sgcc.wf01| 1| 0| 4|127.0.0.1| 6669|Follower|
-| 4|SchemaRegion| Up|root.sgcc.wf01| 1| 0| 3|127.0.0.1| 6667|Follower|
-+--------+------------+------+--------------+------------+----------+----------+---------+-------+--------+
-Total line number = 3
-It costs 0.012s
+IoTDB> show regions of storage group root.sg1, root.sg2
++--------+------------+-------+-------------+-----------+---------+----------+-------+-------+--------+
+|RegionId| Type| Status|Storage Group|SeriesSlots|TimeSlots|DataNodeId| Host|RpcPort| Role|
++--------+------------+-------+-------------+-----------+---------+----------+-------+-------+--------+
+| 0| DataRegion|Running| root.sg1| 1| 1| 1|0.0.0.0| 6667|Follower|
+| 0| DataRegion|Running| root.sg1| 1| 1| 2|0.0.0.0| 6668| Leader|
+| 0| DataRegion|Running| root.sg1| 1| 1| 3|0.0.0.0| 6669|Follower|
+| 1|SchemaRegion|Running| root.sg1| 1| 0| 1|0.0.0.0| 6667|Follower|
+| 1|SchemaRegion|Running| root.sg1| 1| 0| 2|0.0.0.0| 6668|Follower|
+| 1|SchemaRegion|Running| root.sg1| 1| 0| 3|0.0.0.0| 6669| Leader|
+| 2| DataRegion|Running| root.sg2| 1| 1| 1|0.0.0.0| 6667| Leader|
+| 2| DataRegion|Running| root.sg2| 1| 1| 2|0.0.0.0| 6668|Follower|
+| 2| DataRegion|Running| root.sg2| 1| 1| 3|0.0.0.0| 6669|Follower|
+| 3|SchemaRegion|Running| root.sg2| 1| 0| 1|0.0.0.0| 6667|Follower|
+| 3|SchemaRegion|Running| root.sg2| 1| 0| 2|0.0.0.0| 6668| Leader|
+| 3|SchemaRegion|Running| root.sg2| 1| 0| 3|0.0.0.0| 6669|Follower|
++--------+------------+-------+-------------+-----------+---------+----------+-------+-------+--------+
+Total line number = 12
+It costs 0.009s
+
+IoTDB> show data regions of storage group root.sg1, root.sg2
++--------+----------+-------+-------------+-----------+---------+----------+-------+-------+--------+
+|RegionId| Type| Status|Storage Group|SeriesSlots|TimeSlots|DataNodeId| Host|RpcPort| Role|
++--------+----------+-------+-------------+-----------+---------+----------+-------+-------+--------+
+| 0|DataRegion|Running| root.sg1| 1| 1| 1|0.0.0.0| 6667|Follower|
+| 0|DataRegion|Running| root.sg1| 1| 1| 2|0.0.0.0| 6668| Leader|
+| 0|DataRegion|Running| root.sg1| 1| 1| 3|0.0.0.0| 6669|Follower|
+| 2|DataRegion|Running| root.sg2| 1| 1| 1|0.0.0.0| 6667| Leader|
+| 2|DataRegion|Running| root.sg2| 1| 1| 2|0.0.0.0| 6668|Follower|
+| 2|DataRegion|Running| root.sg2| 1| 1| 3|0.0.0.0| 6669|Follower|
++--------+----------+-------+-------------+-----------+---------+----------+-------+-------+--------+
+Total line number = 6
+It costs 0.007s
+
+IoTDB> show schema regions of storage group root.sg1, root.sg2
++--------+------------+-------+-------------+-----------+---------+----------+-------+-------+--------+
+|RegionId| Type| Status|Storage Group|SeriesSlots|TimeSlots|DataNodeId| Host|RpcPort| Role|
++--------+------------+-------+-------------+-----------+---------+----------+-------+-------+--------+
+| 1|SchemaRegion|Running| root.sg1| 1| 0| 1|0.0.0.0| 6667|Follower|
+| 1|SchemaRegion|Running| root.sg1| 1| 0| 2|0.0.0.0| 6668|Follower|
+| 1|SchemaRegion|Running| root.sg1| 1| 0| 3|0.0.0.0| 6669| Leader|
+| 3|SchemaRegion|Running| root.sg2| 1| 0| 1|0.0.0.0| 6667|Follower|
+| 3|SchemaRegion|Running| root.sg2| 1| 0| 2|0.0.0.0| 6668| Leader|
+| 3|SchemaRegion|Running| root.sg2| 1| 0| 3|0.0.0.0| 6669|Follower|
++--------+------------+-------+-------------+-----------+---------+----------+-------+-------+--------+
+Total line number = 6
+It costs 0.009s
```
### Region status definition
diff --git a/docs/zh/UserGuide/Maintenance-Tools/Maintenance-Command.md b/docs/zh/UserGuide/Maintenance-Tools/Maintenance-Command.md
index 81ac8a6aec..6562549d8f 100644
--- a/docs/zh/UserGuide/Maintenance-Tools/Maintenance-Command.md
+++ b/docs/zh/UserGuide/Maintenance-Tools/Maintenance-Command.md
@@ -259,114 +259,128 @@ It costs 0.011s
当前 IoTDB 支持使用如下 SQL 查看 Region:
-- `SHOW REGIONS`: 展示所有 Region
+- `SHOW REGIONS`: 展示所有 Region 分布
- `SHOW SCHEMA REGIONS`: 展示所有 SchemaRegion 分布
- `SHOW DATA REGIONS`: 展示所有 DataRegion 分布
-- `SHOW (DATA|SCHEMA)? REGIONS OF STORAGE GROUP <sg1,sg2,...>`: 展示指定的存储组<sg1,sg2,...>对应的Region分布。
+- `SHOW (DATA|SCHEMA)? REGIONS OF STORAGE GROUP <sg1,sg2,...>`: 展示指定存储组 <sg1,sg2,...> 对应的 Region 分布
-首先来看一下三副本下Region的分布情况:
-
-```
-IoTDB> create timeseries root.sg.d1.s1 with datatype=BOOLEAN,encoding=PLAIN
-Msg: The statement is executed successfully.
-IoTDB> create timeseries root.sg.d2.s1 with datatype=BOOLEAN,encoding=PLAIN
-Msg: The statement is executed successfully.
-IoTDB> create timeseries root.ln.d1.s1 with datatype=BOOLEAN,encoding=PLAIN
-Msg: The statement is executed successfully.
-
-+--------+------------+------+-------------+------------+----------+----------+---------+-------+--------+
-|RegionId| Type|Status|storage group|Series Slots|Time Slots|DataNodeId| Host|RpcPort| Role|
-+--------+------------+------+-------------+------------+----------+----------+---------+-------+--------+
-| 0|SchemaRegion| Up| root.sg| 2| 0| 5|127.0.0.1| 6671|Follower|
-| 0|SchemaRegion| Up| root.sg| 2| 0| 4|127.0.0.1| 6669|Follower|
-| 0|SchemaRegion| Up| root.sg| 2| 0| 3|127.0.0.1| 6667| Leader|
-| 1|SchemaRegion| Up| root.ln| 1| 0| 5|127.0.0.1| 6671|Follower|
-| 1|SchemaRegion| Up| root.ln| 1| 0| 4|127.0.0.1| 6669|Follower|
-| 1|SchemaRegion| Up| root.ln| 1| 0| 3|127.0.0.1| 6667| Leader|
-+--------+------------+------+-------------+------------+----------+----------+---------+-------+--------+
-Total line number = 6
-It costs 0.032s
+展示所有 Region 的分布:
```
-
-然后再来看一下单副本下Region的分布情况:
-
-
-```sql
IoTDB> show regions
-+--------+------------+------+-------------+------------+----------+----------+---------+-------+------+
-|RegionId| Type|Status|storage group|Series Slots|Time Slots|DataNodeId| Host|RpcPort| Role|
-+--------+------------+------+-------------+------------+----------+----------+---------+-------+------+
-| 0|SchemaRegion| Up| root.sg| 2| 0| 5|127.0.0.1| 6671|Leader|
-| 1|SchemaRegion| Up| root.ln| 1| 0| 4|127.0.0.1| 6669|Leader|
-+--------+------------+------+-------------+------------+----------+----------+---------+-------+------+
-Total line number = 2
-It costs 0.128s
++--------+------------+-------+-------------+-----------+---------+----------+-------+-------+--------+
+|RegionId| Type| Status|Storage Group|SeriesSlots|TimeSlots|DataNodeId| Host|RpcPort| Role|
++--------+------------+-------+-------------+-----------+---------+----------+-------+-------+--------+
+| 0| DataRegion|Running| root.sg1| 1| 1| 1|0.0.0.0| 6667|Follower|
+| 0| DataRegion|Running| root.sg1| 1| 1| 2|0.0.0.0| 6668| Leader|
+| 0| DataRegion|Running| root.sg1| 1| 1| 3|0.0.0.0| 6669|Follower|
+| 1|SchemaRegion|Running| root.sg1| 1| 0| 1|0.0.0.0| 6667|Follower|
+| 1|SchemaRegion|Running| root.sg1| 1| 0| 2|0.0.0.0| 6668|Follower|
+| 1|SchemaRegion|Running| root.sg1| 1| 0| 3|0.0.0.0| 6669| Leader|
+| 2| DataRegion|Running| root.sg2| 1| 1| 1|0.0.0.0| 6667| Leader|
+| 2| DataRegion|Running| root.sg2| 1| 1| 2|0.0.0.0| 6668|Follower|
+| 2| DataRegion|Running| root.sg2| 1| 1| 3|0.0.0.0| 6669|Follower|
+| 3|SchemaRegion|Running| root.sg2| 1| 0| 1|0.0.0.0| 6667|Follower|
+| 3|SchemaRegion|Running| root.sg2| 1| 0| 2|0.0.0.0| 6668| Leader|
+| 3|SchemaRegion|Running| root.sg2| 1| 0| 3|0.0.0.0| 6669|Follower|
++--------+------------+-------+-------------+-----------+---------+----------+-------+-------+--------+
+Total line number = 12
+It costs 0.165s
```
-查看Schema Region和Data Region的分布信息:
+展示 SchemaRegion 或 DataRegion 的分布:
```
-IoTDB> insert into root.sg.d1(timestamp,s1) values(1,true)
-Msg: The statement is executed successfully.
-IoTDB> insert into root.ln.d1(timestamp,s1) values(1,true)
-Msg: The statement is executed successfully.
-
IoTDB> show data regions
-+--------+----------+------+-------------+------------+----------+----------+---------+-------+--------+
-|RegionId| Type|Status|storage group|Series Slots|Time Slots|DataNodeId| Host|RpcPort| Role|
-+--------+----------+------+-------------+------------+----------+----------+---------+-------+--------+
-| 2|DataRegion| Up| root.sg| 1| 1| 5|127.0.0.1| 6671|Follower|
-| 2|DataRegion| Up| root.sg| 1| 1| 4|127.0.0.1| 6669| Leader|
-| 2|DataRegion| Up| root.sg| 1| 1| 3|127.0.0.1| 6667|Follower|
-| 3|DataRegion| Up| root.ln| 1| 1| 5|127.0.0.1| 6671| Leader|
-| 3|DataRegion| Up| root.ln| 1| 1| 4|127.0.0.1| 6669|Follower|
-| 3|DataRegion| Up| root.ln| 1| 1| 3|127.0.0.1| 6667|Follower|
-+--------+----------+------+-------------+------------+----------+----------+---------+-------+--------+
-Total line number = 2
++--------+------------+-------+-------------+-----------+---------+----------+-------+-------+--------+
+|RegionId| Type| Status|Storage Group|SeriesSlots|TimeSlots|DataNodeId| Host|RpcPort| Role|
++--------+------------+-------+-------------+-----------+---------+----------+-------+-------+--------+
+| 0| DataRegion|Running| root.sg1| 1| 1| 1|0.0.0.0| 6667|Follower|
+| 0| DataRegion|Running| root.sg1| 1| 1| 2|0.0.0.0| 6668| Leader|
+| 0| DataRegion|Running| root.sg1| 1| 1| 3|0.0.0.0| 6669|Follower|
+| 2| DataRegion|Running| root.sg2| 1| 1| 1|0.0.0.0| 6667| Leader|
+| 2| DataRegion|Running| root.sg2| 1| 1| 2|0.0.0.0| 6668|Follower|
+| 2| DataRegion|Running| root.sg2| 1| 1| 3|0.0.0.0| 6669|Follower|
++--------+------------+-------+-------------+-----------+---------+----------+-------+-------+--------+
+Total line number = 6
It costs 0.011s
+
IoTDB> show schema regions
-+--------+------------+------+-------------+------------+----------+----------+---------+-------+--------+
-|RegionId| Type|Status|storage group|Series Slots|Time Slots|DataNodeId| Host|RpcPort| Role|
-+--------+------------+------+-------------+------------+----------+----------+---------+-------+--------+
-| 0|SchemaRegion| Up| root.sg| 2| 0| 5|127.0.0.1| 6671|Follower|
-| 0|SchemaRegion| Up| root.sg| 2| 0| 4|127.0.0.1| 6669| Leader|
-| 0|SchemaRegion| Up| root.sg| 2| 0| 3|127.0.0.1| 6667|Follower|
-| 1|SchemaRegion| Up| root.ln| 1| 0| 5|127.0.0.1| 6671|Follower|
-| 1|SchemaRegion| Up| root.ln| 1| 0| 4|127.0.0.1| 6669|Follower|
-| 1|SchemaRegion| Up| root.ln| 1| 0| 3|127.0.0.1| 6667| Leader|
-+--------+------------+------+-------------+------------+----------+----------+---------+-------+--------+
-Total line number = 2
++--------+------------+-------+-------------+-----------+---------+----------+-------+-------+--------+
+|RegionId| Type| Status|Storage Group|SeriesSlots|TimeSlots|DataNodeId| Host|RpcPort| Role|
++--------+------------+-------+-------------+-----------+---------+----------+-------+-------+--------+
+| 1|SchemaRegion|Running| root.sg1| 1| 0| 1|0.0.0.0| 6667|Follower|
+| 1|SchemaRegion|Running| root.sg1| 1| 0| 2|0.0.0.0| 6668|Follower|
+| 1|SchemaRegion|Running| root.sg1| 1| 0| 3|0.0.0.0| 6669| Leader|
+| 3|SchemaRegion|Running| root.sg2| 1| 0| 1|0.0.0.0| 6667|Follower|
+| 3|SchemaRegion|Running| root.sg2| 1| 0| 2|0.0.0.0| 6668| Leader|
+| 3|SchemaRegion|Running| root.sg2| 1| 0| 3|0.0.0.0| 6669|Follower|
++--------+------------+-------+-------------+-----------+---------+----------+-------+-------+--------+
+Total line number = 6
It costs 0.012s
```
-展示指定的存储组<sg1,sg2,...>对应的Region分布:
-
+展示指定存储组 <sg1,sg2,...> 对应的 Region 分布:
```
-IoTDB> show regions of storage group root.sg
-+--------+------------+------+-------------+------------+----------+----------+---------+-------+--------+
-|RegionId| Type|Status|storage group|Series Slots|Time Slots|DataNodeId| Host|RpcPort| Role|
-+--------+------------+------+-------------+------------+----------+----------+---------+-------+--------+
-| 0|SchemaRegion| Up| root.sg| 2| 0| 5|127.0.0.1| 6671|Follower|
-| 0|SchemaRegion| Up| root.sg| 2| 0| 4|127.0.0.1| 6669| Leader|
-| 0|SchemaRegion| Up| root.sg| 2| 0| 3|127.0.0.1| 6667|Follower|
-| 2| DataRegion| Up| root.sg| 1| 1| 5|127.0.0.1| 6671|Follower|
-| 2| DataRegion| Up| root.sg| 1| 1| 4|127.0.0.1| 6669| Leader|
-| 2| DataRegion| Up| root.sg| 1| 1| 3|127.0.0.1| 6667|Follower|
-+--------+------------+------+-------------+------------+----------+----------+---------+-------+--------+
-Total line number = 2
-It costs 0.005s
+IoTDB> show regions of storage group root.sg1
++--------+------------+-------+-------------+-----------+---------+----------+-------+-------+--------+
+|RegionId| Type| Status|Storage Group|SeriesSlots|TimeSlots|DataNodeId| Host|RpcPort| Role|
++--------+------------+-------+-------------+-----------+---------+----------+-------+-------+--------+
+| 0| DataRegion|Running| root.sg1| 1| 1| 1|0.0.0.0| 6667|Follower|
+| 0| DataRegion|Running| root.sg1| 1| 1| 2|0.0.0.0| 6668| Leader|
+| 0| DataRegion|Running| root.sg1| 1| 1| 3|0.0.0.0| 6669|Follower|
+| 1|SchemaRegion|Running| root.sg1| 1| 0| 1|0.0.0.0| 6667|Follower|
+| 1|SchemaRegion|Running| root.sg1| 1| 0| 2|0.0.0.0| 6668|Follower|
+| 1|SchemaRegion|Running| root.sg1| 1| 0| 3|0.0.0.0| 6669| Leader|
++--------+------------+-------+-------------+-----------+---------+----------+-------+-------+--------+
+Total line number = 6
+It costs 0.007s
-IoTDB> create timeseries root.sgcc.wf01.d1.wt01 with datatype=BOOLEAN,encoding=PLAIN
-Msg: The statement is executed successfully.
-IoTDB> show regions of storage group root.*.wf01
-+--------+------------+------+--------------+------------+----------+----------+---------+-------+--------+
-|RegionId| Type|Status| storage group|Series Slots|Time Slots|DataNodeId| Host|RpcPort| Role|
-+--------+------------+------+--------------+------------+----------+----------+---------+-------+--------+
-| 4|SchemaRegion| Up|root.sgcc.wf01| 1| 0| 5|127.0.0.1| 6671| Leader|
-| 4|SchemaRegion| Up|root.sgcc.wf01| 1| 0| 4|127.0.0.1| 6669|Follower|
-| 4|SchemaRegion| Up|root.sgcc.wf01| 1| 0| 3|127.0.0.1| 6667|Follower|
-+--------+------------+------+--------------+------------+----------+----------+---------+-------+--------+
-Total line number = 3
-It costs 0.012s
+IoTDB> show regions of storage group root.sg1, root.sg2
++--------+------------+-------+-------------+-----------+---------+----------+-------+-------+--------+
+|RegionId| Type| Status|Storage Group|SeriesSlots|TimeSlots|DataNodeId| Host|RpcPort| Role|
++--------+------------+-------+-------------+-----------+---------+----------+-------+-------+--------+
+| 0| DataRegion|Running| root.sg1| 1| 1| 1|0.0.0.0| 6667|Follower|
+| 0| DataRegion|Running| root.sg1| 1| 1| 2|0.0.0.0| 6668| Leader|
+| 0| DataRegion|Running| root.sg1| 1| 1| 3|0.0.0.0| 6669|Follower|
+| 1|SchemaRegion|Running| root.sg1| 1| 0| 1|0.0.0.0| 6667|Follower|
+| 1|SchemaRegion|Running| root.sg1| 1| 0| 2|0.0.0.0| 6668|Follower|
+| 1|SchemaRegion|Running| root.sg1| 1| 0| 3|0.0.0.0| 6669| Leader|
+| 2| DataRegion|Running| root.sg2| 1| 1| 1|0.0.0.0| 6667| Leader|
+| 2| DataRegion|Running| root.sg2| 1| 1| 2|0.0.0.0| 6668|Follower|
+| 2| DataRegion|Running| root.sg2| 1| 1| 3|0.0.0.0| 6669|Follower|
+| 3|SchemaRegion|Running| root.sg2| 1| 0| 1|0.0.0.0| 6667|Follower|
+| 3|SchemaRegion|Running| root.sg2| 1| 0| 2|0.0.0.0| 6668| Leader|
+| 3|SchemaRegion|Running| root.sg2| 1| 0| 3|0.0.0.0| 6669|Follower|
++--------+------------+-------+-------------+-----------+---------+----------+-------+-------+--------+
+Total line number = 12
+It costs 0.009s
+
+IoTDB> show data regions of storage group root.sg1, root.sg2
++--------+----------+-------+-------------+-----------+---------+----------+-------+-------+--------+
+|RegionId| Type| Status|Storage Group|SeriesSlots|TimeSlots|DataNodeId| Host|RpcPort| Role|
++--------+----------+-------+-------------+-----------+---------+----------+-------+-------+--------+
+| 0|DataRegion|Running| root.sg1| 1| 1| 1|0.0.0.0| 6667|Follower|
+| 0|DataRegion|Running| root.sg1| 1| 1| 2|0.0.0.0| 6668| Leader|
+| 0|DataRegion|Running| root.sg1| 1| 1| 3|0.0.0.0| 6669|Follower|
+| 2|DataRegion|Running| root.sg2| 1| 1| 1|0.0.0.0| 6667| Leader|
+| 2|DataRegion|Running| root.sg2| 1| 1| 2|0.0.0.0| 6668|Follower|
+| 2|DataRegion|Running| root.sg2| 1| 1| 3|0.0.0.0| 6669|Follower|
++--------+----------+-------+-------------+-----------+---------+----------+-------+-------+--------+
+Total line number = 6
+It costs 0.007s
+
+IoTDB> show schema regions of storage group root.sg1, root.sg2
++--------+------------+-------+-------------+-----------+---------+----------+-------+-------+--------+
+|RegionId| Type| Status|Storage Group|SeriesSlots|TimeSlots|DataNodeId| Host|RpcPort| Role|
++--------+------------+-------+-------------+-----------+---------+----------+-------+-------+--------+
+| 1|SchemaRegion|Running| root.sg1| 1| 0| 1|0.0.0.0| 6667|Follower|
+| 1|SchemaRegion|Running| root.sg1| 1| 0| 2|0.0.0.0| 6668|Follower|
+| 1|SchemaRegion|Running| root.sg1| 1| 0| 3|0.0.0.0| 6669| Leader|
+| 3|SchemaRegion|Running| root.sg2| 1| 0| 1|0.0.0.0| 6667|Follower|
+| 3|SchemaRegion|Running| root.sg2| 1| 0| 2|0.0.0.0| 6668| Leader|
+| 3|SchemaRegion|Running| root.sg2| 1| 0| 3|0.0.0.0| 6669|Follower|
++--------+------------+-------+-------------+-----------+---------+----------+-------+-------+--------+
+Total line number = 6
+It costs 0.009s
```
### Region 状态定义