You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2022/10/17 08:44:04 UTC

[GitHub] [iotdb] Beyyes commented on a diff in pull request #7633: Added changes to rpc sqls

Beyyes commented on code in PR #7633:
URL: https://github.com/apache/iotdb/pull/7633#discussion_r996679845


##########
docs/UserGuide/Cluster/Cluster-Setup.md:
##########
@@ -172,12 +172,14 @@ Execute the remove-confignode shell on an active ConfigNode.
 
 Remove on Linux:
 ```
-./confignode/sbin/remove-confignode.sh <id>/<internal_address>:<internal_port>
+./confignode/sbin/remove-confignode.sh <id>
+./confignode/sbin/remove-confignode.sh <internal_address>:<internal_port>
 ```
 
 Remove on Windows:
 ```
-confignode\sbin\remove-confignode.bat <id>/<internal_address>:<internal_port>
+confignode\sbin\remove-confignode.bat <id>

Review Comment:
   ```suggestion
   confignode\sbin\remove-confignode.bat <confignode_id>
   ```



##########
docs/UserGuide/Cluster/Cluster-Setup.md:
##########
@@ -172,12 +172,14 @@ Execute the remove-confignode shell on an active ConfigNode.
 
 Remove on Linux:
 ```
-./confignode/sbin/remove-confignode.sh <id>/<internal_address>:<internal_port>
+./confignode/sbin/remove-confignode.sh <id>

Review Comment:
   ```suggestion
   ./confignode/sbin/remove-confignode.sh <confignode_id>
   ```



##########
docs/zh/UserGuide/Cluster/Cluster-Setup.md:
##########
@@ -173,12 +173,14 @@ datanode\sbin\start-cli.bat
 
 Linux 移除方式:
 ```
-./confignode/sbin/remove-confignode.sh <id>/<internal_address>:<internal_port>
+./confignode/sbin/remove-confignode.sh <id>
+./confignode/sbin/remove-confignode.sh <internal_address>:<internal_port>
 ```
 
 Windows 移除方式:
 ```
-confignode\sbin\remove-confignode.bat <id>/<internal_address>:<internal_port>
+confignode\sbin\remove-confignode.bat <id>

Review Comment:
   ```suggestion
   confignode\sbin\remove-confignode.bat <confignode_id>
   ```



##########
docs/zh/UserGuide/Maintenance-Tools/Maintenance-Command.md:
##########
@@ -388,4 +388,101 @@ It costs 0.009s
 
 - **Running**: Region 正常运行,可读可写
 - **Removing**: Region 所在 DataNode 正在被移出集群,不可读写
-- **Unknown**: Region 所在 DataNode 未正常上报心跳,ConfigNode 认为该 Region 不可读写
\ No newline at end of file
+- **Unknown**: Region 所在 DataNode 未正常上报心跳,ConfigNode 认为该 Region 不可读写
+
+## 集群槽路径监控工具
+
+集群使用分片来管理数据和元数据,一个存储组的元数据分片定义为序列槽,而数据分片定义为<序列槽,分区槽>的数对。为了得到分片相关的信息,可以使用以下SQL来查询:

Review Comment:
   ```suggestion
   集群使用分片来管理数据和元数据,一个存储组的元数据分片定义为序列槽,而数据分片定义为<序列槽,时间分区槽>的数对。为了得到分片相关的信息,可以使用以下SQL来查询:
   ```



##########
docs/UserGuide/Cluster/Cluster-Setup.md:
##########
@@ -172,12 +172,14 @@ Execute the remove-confignode shell on an active ConfigNode.
 
 Remove on Linux:
 ```
-./confignode/sbin/remove-confignode.sh <id>/<internal_address>:<internal_port>
+./confignode/sbin/remove-confignode.sh <id>

Review Comment:
   also change the usage description of `remove-datanode.sh`



##########
docs/zh/UserGuide/Cluster/Cluster-Setup.md:
##########
@@ -173,12 +173,14 @@ datanode\sbin\start-cli.bat
 
 Linux 移除方式:
 ```
-./confignode/sbin/remove-confignode.sh <id>/<internal_address>:<internal_port>
+./confignode/sbin/remove-confignode.sh <id>

Review Comment:
   ```suggestion
   ./confignode/sbin/remove-confignode.sh <confignode_id>
   ```



##########
docs/UserGuide/Maintenance-Tools/Maintenance-Command.md:
##########
@@ -409,4 +409,102 @@ The Region statuses are defined as follows:
 
 - **Running**: The Region is running properly and can be read and written
 - **Removing**: The DataNode where the Region located is being removed from the cluster, the Region cannot be read or written
-- **Unknown**: The DataNode where the Region located doesn't report heartbeat properly, the ConfigNode considers the Region as unreadable and un-writable
\ No newline at end of file
+- **Unknown**: The DataNode where the Region located doesn't report heartbeat properly, the ConfigNode considers the Region as unreadable and un-writable
+
+## Monitoring tool for cluster slots routing
+
+A cluster uses partitions for data and metadata arrangement, with a storage group's metadata partitions defined as series slot, and data partitions as <series slot, time slot> pair. To acquire this part of information, you can use the following SQLs for query:
+
+### Trace data partition's regionid
+
+Trace a data partition (or data partitions under the same series slot)'s assigned regions:
+- `SHOW DATA REGIONID OF root.sg WHERE SERIESSLOTID=s0 (AND TIMESLOTID=t0)`
+
+Eg:
+```
+IoTDB> show data regionid of root.sg where seriesslotid=5286 and timeslotid=0
++--------+
+|RegionId|
++--------+
+|       1|
++--------+
+Total line number = 1
+It costs 0.006s
+
+IoTDB> show data regionid of root.sg where seriesslotid=5286
++--------+
+|RegionId|
++--------+
+|       1|
+|       2|
++--------+
+Total line number = 2
+It costs 0.006s
+```
+
+### Trace schema partition's regionid

Review Comment:
   regionid of schema partition?



##########
docs/zh/UserGuide/Maintenance-Tools/Maintenance-Command.md:
##########
@@ -388,4 +388,101 @@ It costs 0.009s
 
 - **Running**: Region 正常运行,可读可写
 - **Removing**: Region 所在 DataNode 正在被移出集群,不可读写
-- **Unknown**: Region 所在 DataNode 未正常上报心跳,ConfigNode 认为该 Region 不可读写
\ No newline at end of file
+- **Unknown**: Region 所在 DataNode 未正常上报心跳,ConfigNode 认为该 Region 不可读写
+
+## 集群槽路径监控工具
+
+集群使用分片来管理数据和元数据,一个存储组的元数据分片定义为序列槽,而数据分片定义为<序列槽,分区槽>的数对。为了得到分片相关的信息,可以使用以下SQL来查询:
+### 追踪数据分片的分区
+
+追踪一个数据分片(或一个序列槽下的所有数据分片)的对应分区:
+- `SHOW DATA REGIONID OF root.sg WHERE SERIESSLOTID=s0 (AND TIMESLOTID=t0)`
+
+示例:
+```
+IoTDB> show data regionid of root.sg where seriesslotid=5286 and timeslotid=0
++--------+
+|RegionId|
++--------+
+|       1|
++--------+
+Total line number = 1
+It costs 0.006s
+
+IoTDB> show data regionid of root.sg where seriesslotid=5286
++--------+
+|RegionId|
++--------+
+|       1|
+|       2|
++--------+
+Total line number = 2
+It costs 0.006s
+```
+
+### 追踪元数据分片的分区
+追踪一个元数据分片下的对应分区:
+- `SHOW SCHEMA REGIONID OF root.sg WHERE SERIESSLOTID=s0`
+
+示例:
+```
+IoTDB> show schema regionid of root.sg where seriesslotid=5286
++--------+
+|RegionId|
++--------+
+|       0|
++--------+
+Total line number = 1
+It costs 0.007s
+```
+### 追踪序列槽下的时间槽
+展示一个存储组内,一个特定序列槽下的所有时间槽:
+- `SHOW TIMESLOTID OF root.sg WHERE SERIESLOTID=s0 (AND STARTTIME=t1) (AND ENDTIME=t2)`
+
+示例:
+```
+IoTDB> show timeslotid of root.sg where seriesslotid=5286
++---------+
+|Timeslots|

Review Comment:
   `TimeslotId` is better?



##########
docs/UserGuide/Maintenance-Tools/Maintenance-Command.md:
##########
@@ -409,4 +409,102 @@ The Region statuses are defined as follows:
 
 - **Running**: The Region is running properly and can be read and written
 - **Removing**: The DataNode where the Region located is being removed from the cluster, the Region cannot be read or written
-- **Unknown**: The DataNode where the Region located doesn't report heartbeat properly, the ConfigNode considers the Region as unreadable and un-writable
\ No newline at end of file
+- **Unknown**: The DataNode where the Region located doesn't report heartbeat properly, the ConfigNode considers the Region as unreadable and un-writable
+
+## Monitoring tool for cluster slots routing
+
+A cluster uses partitions for data and metadata arrangement, with a storage group's metadata partitions defined as series slot, and data partitions as <series slot, time slot> pair. To acquire this part of information, you can use the following SQLs for query:
+
+### Trace data partition's regionid
+
+Trace a data partition (or data partitions under the same series slot)'s assigned regions:
+- `SHOW DATA REGIONID OF root.sg WHERE SERIESSLOTID=s0 (AND TIMESLOTID=t0)`
+
+Eg:
+```
+IoTDB> show data regionid of root.sg where seriesslotid=5286 and timeslotid=0
++--------+
+|RegionId|
++--------+
+|       1|
++--------+
+Total line number = 1
+It costs 0.006s
+
+IoTDB> show data regionid of root.sg where seriesslotid=5286
++--------+
+|RegionId|
++--------+
+|       1|
+|       2|
++--------+
+Total line number = 2
+It costs 0.006s
+```
+
+### Trace schema partition's regionid
+Trace a schema partition's assigned regions:
+- `SHOW SCHEMA REGIONID OF root.sg WHERE SERIESSLOTID=s0`
+
+Eg:
+```
+IoTDB> show schema regionid of root.sg where seriesslotid=5286
++--------+
+|RegionId|
++--------+
+|       0|
++--------+
+Total line number = 1
+It costs 0.007s
+```
+### Trace series slot's time slots
+Show the time slots under particular series slot in a storage group.
+- `SHOW TIMESLOTID OF root.sg WHERE SERIESLOTID=s0 (AND STARTTIME=t1) (AND ENDTIME=t2)`
+
+Eg:

Review Comment:
   SQL Examples:



##########
docs/zh/UserGuide/Maintenance-Tools/Maintenance-Command.md:
##########
@@ -388,4 +388,101 @@ It costs 0.009s
 
 - **Running**: Region 正常运行,可读可写
 - **Removing**: Region 所在 DataNode 正在被移出集群,不可读写
-- **Unknown**: Region 所在 DataNode 未正常上报心跳,ConfigNode 认为该 Region 不可读写
\ No newline at end of file
+- **Unknown**: Region 所在 DataNode 未正常上报心跳,ConfigNode 认为该 Region 不可读写
+
+## 集群槽路径监控工具
+
+集群使用分片来管理数据和元数据,一个存储组的元数据分片定义为序列槽,而数据分片定义为<序列槽,分区槽>的数对。为了得到分片相关的信息,可以使用以下SQL来查询:

Review Comment:
   ```suggestion
   集群使用分片来管理数据和元数据,一个存储组的元数据分片定义为序列槽,而数据分片定义为<序列槽,时间分区槽>的数对。为了得到分片相关的信息,可以使用以下SQL来查询:
   ```



##########
docs/zh/UserGuide/Maintenance-Tools/Maintenance-Command.md:
##########
@@ -388,4 +388,101 @@ It costs 0.009s
 
 - **Running**: Region 正常运行,可读可写
 - **Removing**: Region 所在 DataNode 正在被移出集群,不可读写
-- **Unknown**: Region 所在 DataNode 未正常上报心跳,ConfigNode 认为该 Region 不可读写
\ No newline at end of file
+- **Unknown**: Region 所在 DataNode 未正常上报心跳,ConfigNode 认为该 Region 不可读写
+
+## 集群槽路径监控工具
+
+集群使用分片来管理数据和元数据,一个存储组的元数据分片定义为序列槽,而数据分片定义为<序列槽,分区槽>的数对。为了得到分片相关的信息,可以使用以下SQL来查询:

Review Comment:
   add a blank



##########
docs/zh/UserGuide/Maintenance-Tools/Maintenance-Command.md:
##########
@@ -388,4 +388,101 @@ It costs 0.009s
 
 - **Running**: Region 正常运行,可读可写
 - **Removing**: Region 所在 DataNode 正在被移出集群,不可读写
-- **Unknown**: Region 所在 DataNode 未正常上报心跳,ConfigNode 认为该 Region 不可读写
\ No newline at end of file
+- **Unknown**: Region 所在 DataNode 未正常上报心跳,ConfigNode 认为该 Region 不可读写
+
+## 集群槽路径监控工具
+
+集群使用分片来管理数据和元数据,一个存储组的元数据分片定义为序列槽,而数据分片定义为<序列槽,分区槽>的数对。为了得到分片相关的信息,可以使用以下SQL来查询:
+### 追踪数据分片的分区
+
+追踪一个数据分片(或一个序列槽下的所有数据分片)的对应分区:
+- `SHOW DATA REGIONID OF root.sg WHERE SERIESSLOTID=s0 (AND TIMESLOTID=t0)`
+
+示例:
+```
+IoTDB> show data regionid of root.sg where seriesslotid=5286 and timeslotid=0
++--------+
+|RegionId|
++--------+
+|       1|
++--------+
+Total line number = 1
+It costs 0.006s
+
+IoTDB> show data regionid of root.sg where seriesslotid=5286
++--------+
+|RegionId|
++--------+
+|       1|
+|       2|
++--------+
+Total line number = 2
+It costs 0.006s
+```
+
+### 追踪元数据分片的分区
+追踪一个元数据分片下的对应分区:
+- `SHOW SCHEMA REGIONID OF root.sg WHERE SERIESSLOTID=s0`
+
+示例:
+```
+IoTDB> show schema regionid of root.sg where seriesslotid=5286
++--------+
+|RegionId|
++--------+
+|       0|
++--------+
+Total line number = 1
+It costs 0.007s
+```
+### 追踪序列槽下的时间槽
+展示一个存储组内,一个特定序列槽下的所有时间槽:
+- `SHOW TIMESLOTID OF root.sg WHERE SERIESLOTID=s0 (AND STARTTIME=t1) (AND ENDTIME=t2)`
+
+示例:
+```
+IoTDB> show timeslotid of root.sg where seriesslotid=5286
++---------+
+|Timeslots|
++---------+
+|        0|
+|     1000|
++---------+
+Total line number = 1
+It costs 0.007s
+```
+### 追踪存储组的序列槽
+展示一个存储组内,数据,元数据或是所有的序列槽:
+- `SHOW (DATA|SCHEMA)? SERIESSLOTID OF root.sg`
+
+示例:
+```
+IoTDB> show data seriesslotid of root.sg
++-----------+
+|SeriesSlots|
++-----------+
+|       5286|
++-----------+
+Total line number = 1
+It costs 0.007s
+
+IoTDB> show schema seriesslotid of root.sg
++-----------+
+|SeriesSlots|
++-----------+
+|       5286|
++-----------+
+Total line number = 1
+It costs 0.006s
+
+IoTDB> show seriesslotid of root.sg
++-----------+
+|SeriesSlots|
++-----------+
+|       5286|
++-----------+
+Total line number = 1
+It costs 0.006s
+```
+#### 注意:
+通常情况下,一个存储组内,数据和元数据的序列槽是相同的。然而,你可以仍然使用不同的sql,以防它们在某些意外情况下并不相同。

Review Comment:
   `然而,你可以仍然使用不同的sql,以防它们在某些意外情况下并不相同。` 是指?



##########
docs/UserGuide/Maintenance-Tools/Maintenance-Command.md:
##########
@@ -409,4 +409,102 @@ The Region statuses are defined as follows:
 
 - **Running**: The Region is running properly and can be read and written
 - **Removing**: The DataNode where the Region located is being removed from the cluster, the Region cannot be read or written
-- **Unknown**: The DataNode where the Region located doesn't report heartbeat properly, the ConfigNode considers the Region as unreadable and un-writable
\ No newline at end of file
+- **Unknown**: The DataNode where the Region located doesn't report heartbeat properly, the ConfigNode considers the Region as unreadable and un-writable
+
+## Monitoring tool for cluster slots routing
+
+A cluster uses partitions for data and metadata arrangement, with a storage group's metadata partitions defined as series slot, and data partitions as <series slot, time slot> pair. To acquire this part of information, you can use the following SQLs for query:
+
+### Trace data partition's regionid
+
+Trace a data partition (or data partitions under the same series slot)'s assigned regions:
+- `SHOW DATA REGIONID OF root.sg WHERE SERIESSLOTID=s0 (AND TIMESLOTID=t0)`
+
+Eg:
+```
+IoTDB> show data regionid of root.sg where seriesslotid=5286 and timeslotid=0
++--------+
+|RegionId|
++--------+
+|       1|
++--------+
+Total line number = 1
+It costs 0.006s
+
+IoTDB> show data regionid of root.sg where seriesslotid=5286
++--------+
+|RegionId|
++--------+
+|       1|
+|       2|
++--------+
+Total line number = 2
+It costs 0.006s
+```
+
+### Trace schema partition's regionid
+Trace a schema partition's assigned regions:

Review Comment:
   assigned regions of schema partition?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org