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 e4250bb101 [IOTDB-4080] Change the port name of show cluster, show
regions, show confignodes, show datandoes; make running result of
`Remove-datanode.sh` clear (#7403)
e4250bb101 is described below
commit e4250bb101892ef676208fcb8e54eb342e624b85
Author: Beyyes <[email protected]>
AuthorDate: Fri Sep 23 14:29:29 2022 +0800
[IOTDB-4080] Change the port name of show cluster, show regions, show
confignodes, show datandoes; make running result of `Remove-datanode.sh` clear
(#7403)
---
.../procedure/env/DataNodeRemoveHandler.java | 8 +-
.../Maintenance-Tools/Maintenance-Command.md | 210 ++++++++++-----------
.../Maintenance-Tools/Maintenance-Command.md | 190 +++++++++----------
.../apache/iotdb/commons/utils/NodeUrlUtils.java | 4 +-
.../db/mpp/common/header/ColumnHeaderConstant.java | 11 +-
.../db/service/DataNodeServerCommandLine.java | 7 +-
6 files changed, 218 insertions(+), 212 deletions(-)
diff --git
a/confignode/src/main/java/org/apache/iotdb/confignode/procedure/env/DataNodeRemoveHandler.java
b/confignode/src/main/java/org/apache/iotdb/confignode/procedure/env/DataNodeRemoveHandler.java
index d93ca8398a..bcf5ba1a6e 100644
---
a/confignode/src/main/java/org/apache/iotdb/confignode/procedure/env/DataNodeRemoveHandler.java
+++
b/confignode/src/main/java/org/apache/iotdb/confignode/procedure/env/DataNodeRemoveHandler.java
@@ -507,8 +507,12 @@ public class DataNodeRemoveHandler {
if (allDataNodeSize - removedDataNodeSize < NodeInfo.getMinimumDataNode())
{
status.setCode(TSStatusCode.LACK_REPLICATION.getStatusCode());
status.setMessage(
- "lack replication, allow most removed Data Node size : "
- + (allDataNodeSize - NodeInfo.getMinimumDataNode()));
+ String.format(
+ "Can't remove datanode due to the limit of replication factor, "
+ + "allDataNodeSize: %s, maxReplicaFactor: %s, max allowed
removed Data Node size is: %s",
+ allDataNodeSize,
+ NodeInfo.getMinimumDataNode(),
+ (allDataNodeSize - NodeInfo.getMinimumDataNode())));
}
return status;
}
diff --git a/docs/UserGuide/Maintenance-Tools/Maintenance-Command.md
b/docs/UserGuide/Maintenance-Tools/Maintenance-Command.md
index 06f137ca09..3d200fd07e 100644
--- a/docs/UserGuide/Maintenance-Tools/Maintenance-Command.md
+++ b/docs/UserGuide/Maintenance-Tools/Maintenance-Command.md
@@ -148,44 +148,44 @@ Msg: The statement is executed successfully.
IoTDB> create timeseries root.ln.d1.s1 with datatype=BOOLEAN,encoding=PLAIN
Msg: The statement is executed successfully.
IoTDB> show regions
-+--------+------------+------+-------------+------------+----------+----------+---------+----+------+
-|RegionId| Type|Status|storage group|Series Slots|Time
Slots|DataNodeId| Host|Port| Role|
-+--------+------------+------+-------------+------------+----------+----------+---------+----+------+
-| 0|SchemaRegion| Up| root.sg| 2| 0|
1|127.0.0.1|6667|Leader|
-| 1|SchemaRegion| Up| root.ln| 1| 0|
2|127.0.0.1|6668|Leader|
-+--------+------------+------+-------------+------------+----------+----------+---------+----+------+
++--------+------------+------+-------------+------------+----------+----------+---------+-------+------+
+|RegionId| Type|Status|storage group|Series Slots|Time
Slots|DataNodeId| Host|RpcPort| Role|
++--------+------------+------+-------------+------------+----------+----------+---------+-------+------+
+| 0|SchemaRegion| Up| root.sg| 2| 0|
1|127.0.0.1| 6667|Leader|
+| 1|SchemaRegion| Up| root.ln| 1| 0|
2|127.0.0.1| 6668|Leader|
++--------+------------+------+-------------+------------+----------+----------+---------+-------+------+
Total line number = 2
It costs 0.013s
IoTDB> show datanodes
-+------+-------+---------+----+-------------+---------------+
-|NodeID| Status| Host|Port|DataRegionNum|SchemaRegionNum|
-+------+-------+---------+----+-------------+---------------+
-| 1|Running|127.0.0.1|6667| 0| 1|
-| 2|Running|127.0.0.1|6668| 0| 1|
-+------+-------+---------+----+-------------+---------------+
++------+-------+---------+-------+-------------+---------------+
+|NodeID| Status| Host|RpcPort|DataRegionNum|SchemaRegionNum|
++------+-------+---------+-------+-------------+---------------+
+| 1|Running|127.0.0.1| 6667| 0| 1|
+| 2|Running|127.0.0.1| 6668| 0| 1|
++------+-------+---------+-------+-------------+---------------+
Total line number = 2
It costs 0.007s
IoTDB> insert into root.ln.d1(timestamp,s1) values(1,true)
Msg: The statement is executed successfully.
IoTDB> show regions
-+--------+------------+------+-------------+------------+----------+----------+---------+----+------+
-|RegionId| Type|Status|storage group|Series Slots|Time
Slots|DataNodeId| Host|Port| Role|
-+--------+------------+------+-------------+------------+----------+----------+---------+----+------+
-| 0|SchemaRegion| Up| root.sg| 2| 0|
1|127.0.0.1|6667|Leader|
-| 1|SchemaRegion| Up| root.ln| 1| 0|
2|127.0.0.1|6668|Leader|
-| 2| DataRegion| Up| root.ln| 1| 1|
1|127.0.0.1|6667|Leader|
-+--------+------------+------+-------------+------------+----------+----------+---------+----+------+
++--------+------------+------+-------------+------------+----------+----------+---------+-------+------+
+|RegionId| Type|Status|storage group|Series Slots|Time
Slots|DataNodeId| Host|RpcPort| Role|
++--------+------------+------+-------------+------------+----------+----------+---------+-------+------+
+| 0|SchemaRegion| Up| root.sg| 2| 0|
1|127.0.0.1| 6667|Leader|
+| 1|SchemaRegion| Up| root.ln| 1| 0|
2|127.0.0.1| 6668|Leader|
+| 2| DataRegion| Up| root.ln| 1| 1|
1|127.0.0.1| 6667|Leader|
++--------+------------+------+-------------+------------+----------+----------+---------+-------+------+
Total line number = 3
It costs 0.008s
IoTDB> show datanodes
-+------+-------+---------+----+-------------+---------------+
-|NodeID| Status| Host|Port|DataRegionNum|SchemaRegionNum|
-+------+-------+---------+----+-------------+---------------+
-| 1|Running|127.0.0.1|6667| 1| 1|
-| 2|Running|127.0.0.1|6668| 0| 1|
-+------+-------+---------+----+-------------+---------------+
++------+-------+---------+-------+-------------+---------------+
+|NodeID| Status| Host|RpcPort|DataRegionNum|SchemaRegionNum|
++------+-------+---------+-------+-------------+---------------+
+| 1|Running|127.0.0.1| 6667| 1| 1|
+| 2|Running|127.0.0.1| 6668| 0| 1|
++------+-------+---------+-------+-------------+---------------+
Total line number = 2
It costs 0.006s
```
@@ -210,13 +210,13 @@ Eg :
```
IoTDB> show confignodes
-+------+-------+-------+-----+--------+
-|NodeID| Status| Host| Port| Role|
-+------+-------+-------+-----+--------+
-| 0|Running|0.0.0.0|22277| Leader|
-| 1|Running|0.0.0.0|22279|Follower|
-| 2|Running|0.0.0.0|22281|Follower|
-+------+-------+-------+-----+--------+
++------+-------+-------+------------+--------+
+|NodeID| Status| Host|InternalPort| Role|
++------+-------+-------+------------+--------+
+| 0|Running|0.0.0.0| 22277| Leader|
+| 1|Running|0.0.0.0| 22279|Follower|
+| 2|Running|0.0.0.0| 22281|Follower|
++------+-------+-------+------------+--------+
Total line number = 3
It costs 0.030s
```
@@ -239,16 +239,16 @@ Eg:
```
IoTDB> show cluster
-+------+----------+-------+---------+-----+
-|NodeID| NodeType| Status| Host| Port|
-+------+----------+-------+---------+-----+
-| 0|ConfigNode|Running| 0.0.0.0|22277|
-| 1|ConfigNode|Running| 0.0.0.0|22279|
-| 2|ConfigNode|Running| 0.0.0.0|22281|
-| 3| DataNode|Running|127.0.0.1| 9003|
-| 4| DataNode|Running|127.0.0.1| 9005|
-| 5| DataNode|Running|127.0.0.1| 9007|
-+------+----------+-------+---------+-----+
++------+----------+-------+---------+------------+
+|NodeID| NodeType| Status| Host|InternalPort|
++------+----------+-------+---------+------------+
+| 0|ConfigNode|Running| 0.0.0.0| 22277|
+| 1|ConfigNode|Running| 0.0.0.0| 22279|
+| 2|ConfigNode|Running| 0.0.0.0| 22281|
+| 3| DataNode|Running|127.0.0.1| 9003|
+| 4| DataNode|Running|127.0.0.1| 9005|
+| 5| DataNode|Running|127.0.0.1| 9007|
++------+----------+-------+---------+------------+
Total line number = 6
It costs 0.011s
```
@@ -257,16 +257,16 @@ After a node is stopped, its status will change, as shown
below:
```
IoTDB> show cluster
-+------+----------+-------+---------+-----+
-|NodeID| NodeType| Status| Host| Port|
-+------+----------+-------+---------+-----+
-| 0|ConfigNode|Running| 0.0.0.0|22277|
-| 1|ConfigNode|Unknown| 0.0.0.0|22279|
-| 2|ConfigNode|Running| 0.0.0.0|22281|
-| 3| DataNode|Running|127.0.0.1| 9003|
-| 4| DataNode|Running|127.0.0.1| 9005|
-| 5| DataNode|Running|127.0.0.1| 9007|
-+------+----------+-------+---------+-----+
++------+----------+-------+---------+------------+
+|NodeID| NodeType| Status| Host|InternalPort|
++------+----------+-------+---------+------------+
+| 0|ConfigNode|Running| 0.0.0.0| 22277|
+| 1|ConfigNode|Unknown| 0.0.0.0| 22279|
+| 2|ConfigNode|Running| 0.0.0.0| 22281|
+| 3| DataNode|Running|127.0.0.1| 9003|
+| 4| DataNode|Running|127.0.0.1| 9005|
+| 5| DataNode|Running|127.0.0.1| 9007|
++------+----------+-------+---------+------------+
Total line number = 6
It costs 0.012s
```
@@ -294,16 +294,16 @@ 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|Port| 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|
-+--------+------------+------+-------------+------------+----------+----------+---------+----+--------+
++--------+------------+------+-------------+------------+----------+----------+---------+-------+--------+
+|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
```
@@ -313,12 +313,12 @@ 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|Port| 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|
-+--------+------------+------+-------------+------------+----------+----------+---------+----+------+
++--------+------------+------+-------------+------------+----------+----------+---------+-------+------+
+|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
```
@@ -332,29 +332,29 @@ 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|Port| 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|
-+--------+----------+------+-------------+------------+----------+----------+---------+----+--------+
++--------+----------+------+-------------+------------+----------+----------+---------+-------+--------+
+|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
It costs 0.011s
IoTDB> show schema regions
-+--------+------------+------+-------------+------------+----------+----------+---------+----+--------+
-|RegionId| Type|Status|storage group|Series Slots|Time
Slots|DataNodeId| Host|Port| 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|
-+--------+------------+------+-------------+------------+----------+----------+---------+----+--------+
++--------+------------+------+-------------+------------+----------+----------+---------+-------+--------+
+|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
It costs 0.012s
```
@@ -363,29 +363,29 @@ Show region distribution of specified storage groups
```
IoTDB> show regions of storage group root.sg
-+--------+------------+------+-------------+------------+----------+----------+---------+----+--------+
-|RegionId| Type|Status|storage group|Series Slots|Time
Slots|DataNodeId| Host|Port| 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|
-+--------+------------+------+-------------+------------+----------+----------+---------+----+--------+
++--------+------------+------+-------------+------------+----------+----------+---------+-------+--------+
+|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> 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|Port| 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|
-+--------+------------+------+--------------+------------+----------+----------+---------+----+--------+
++--------+------------+------+--------------+------------+----------+----------+---------+-------+--------+
+|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
```
diff --git a/docs/zh/UserGuide/Maintenance-Tools/Maintenance-Command.md
b/docs/zh/UserGuide/Maintenance-Tools/Maintenance-Command.md
index ac85faa8f1..81ac8a6aec 100644
--- a/docs/zh/UserGuide/Maintenance-Tools/Maintenance-Command.md
+++ b/docs/zh/UserGuide/Maintenance-Tools/Maintenance-Command.md
@@ -146,44 +146,44 @@ Msg: The statement is executed successfully.
IoTDB> create timeseries root.ln.d1.s1 with datatype=BOOLEAN,encoding=PLAIN
Msg: The statement is executed successfully.
IoTDB> show regions
-+--------+------------+------+-------------+------------+----------+----------+---------+----+------+
-|RegionId| Type|Status|storage group|Series Slots|Time
Slots|DataNodeId| Host|Port| Role|
-+--------+------------+------+-------------+------------+----------+----------+---------+----+------+
-| 0|SchemaRegion| Up| root.sg| 2| 0|
1|127.0.0.1|6667|Leader|
-| 1|SchemaRegion| Up| root.ln| 1| 0|
2|127.0.0.1|6668|Leader|
-+--------+------------+------+-------------+------------+----------+----------+---------+----+------+
++--------+------------+------+-------------+------------+----------+----------+---------+-------+------+
+|RegionId| Type|Status|storage group|Series Slots|Time
Slots|DataNodeId| Host|RpcPort| Role|
++--------+------------+------+-------------+------------+----------+----------+---------+-------+------+
+| 0|SchemaRegion| Up| root.sg| 2| 0|
1|127.0.0.1| 6667|Leader|
+| 1|SchemaRegion| Up| root.ln| 1| 0|
2|127.0.0.1| 6668|Leader|
++--------+------------+------+-------------+------------+----------+----------+---------+-------+------+
Total line number = 2
It costs 0.013s
IoTDB> show datanodes
-+------+-------+---------+----+-------------+---------------+
-|NodeID| Status| Host|Port|DataRegionNum|SchemaRegionNum|
-+------+-------+---------+----+-------------+---------------+
-| 1|Running|127.0.0.1|6667| 0| 1|
-| 2|Running|127.0.0.1|6668| 0| 1|
-+------+-------+---------+----+-------------+---------------+
++------+-------+---------+-------+-------------+---------------+
+|NodeID| Status| Host|RpcPort|DataRegionNum|SchemaRegionNum|
++------+-------+---------+-------+-------------+---------------+
+| 1|Running|127.0.0.1| 6667| 0| 1|
+| 2|Running|127.0.0.1| 6668| 0| 1|
++------+-------+---------+-------+-------------+---------------+
Total line number = 2
It costs 0.007s
IoTDB> insert into root.ln.d1(timestamp,s1) values(1,true)
Msg: The statement is executed successfully.
IoTDB> show regions
-+--------+------------+------+-------------+------------+----------+----------+---------+----+------+
-|RegionId| Type|Status|storage group|Series Slots|Time
Slots|DataNodeId| Host|Port| Role|
-+--------+------------+------+-------------+------------+----------+----------+---------+----+------+
-| 0|SchemaRegion| Up| root.sg| 2| 0|
1|127.0.0.1|6667|Leader|
-| 1|SchemaRegion| Up| root.ln| 1| 0|
2|127.0.0.1|6668|Leader|
-| 2| DataRegion| Up| root.ln| 1| 1|
1|127.0.0.1|6667|Leader|
-+--------+------------+------+-------------+------------+----------+----------+---------+----+------+
++--------+------------+------+-------------+------------+----------+----------+---------+-------+------+
+|RegionId| Type|Status|storage group|Series Slots|Time
Slots|DataNodeId| Host|RpcPort| Role|
++--------+------------+------+-------------+------------+----------+----------+---------+-------+------+
+| 0|SchemaRegion| Up| root.sg| 2| 0|
1|127.0.0.1| 6667|Leader|
+| 1|SchemaRegion| Up| root.ln| 1| 0|
2|127.0.0.1| 6668|Leader|
+| 2| DataRegion| Up| root.ln| 1| 1|
1|127.0.0.1| 6667|Leader|
++--------+------------+------+-------------+------------+----------+----------+---------+-------+------+
Total line number = 3
It costs 0.008s
IoTDB> show datanodes
-+------+-------+---------+----+-------------+---------------+
-|NodeID| Status| Host|Port|DataRegionNum|SchemaRegionNum|
-+------+-------+---------+----+-------------+---------------+
-| 1|Running|127.0.0.1|6667| 1| 1|
-| 2|Running|127.0.0.1|6668| 0| 1|
-+------+-------+---------+----+-------------+---------------+
++------+-------+---------+-------+-------------+---------------+
+|NodeID| Status| Host|RpcPort|DataRegionNum|SchemaRegionNum|
++------+-------+---------+-------+-------------+---------------+
+| 1|Running|127.0.0.1| 6667| 1| 1|
+| 2|Running|127.0.0.1| 6668| 0| 1|
++------+-------+---------+-------+-------------+---------------+
Total line number = 2
It costs 0.006s
```
@@ -208,13 +208,13 @@ SHOW CONFIGNODES
```
IoTDB> show confignodes
-+------+-------+-------+-----+--------+
-|NodeID| Status| Host| Port| Role|
-+------+-------+-------+-----+--------+
-| 0|Running|0.0.0.0|22277| Leader|
-| 1|Running|0.0.0.0|22279|Follower|
-| 2|Running|0.0.0.0|22281|Follower|
-+------+-------+-------+-----+--------+
++------+-------+-------+------------+--------+
+|NodeID| Status| Host|InternalPort| Role|
++------+-------+-------+------------+--------+
+| 0|Running|0.0.0.0| 22277| Leader|
+| 1|Running|0.0.0.0| 22279|Follower|
+| 2|Running|0.0.0.0| 22281|Follower|
++------+-------+-------+------------+--------+
Total line number = 3
It costs 0.030s
```
@@ -237,16 +237,16 @@ SHOW CLUSTER
```
IoTDB> show cluster
-+------+----------+-------+---------+-----+
-|NodeID| NodeType| Status| Host| Port|
-+------+----------+-------+---------+-----+
-| 0|ConfigNode|Running| 0.0.0.0|22277|
-| 1|ConfigNode|Running| 0.0.0.0|22279|
-| 2|ConfigNode|Running| 0.0.0.0|22281|
-| 3| DataNode|Running|127.0.0.1| 9003|
-| 4| DataNode|Running|127.0.0.1| 9005|
-| 5| DataNode|Running|127.0.0.1| 9007|
-+------+----------+-------+---------+-----+
++------+----------+-------+---------+------------+
+|NodeID| NodeType| Status| Host|InternalPort|
++------+----------+-------+---------+------------+
+| 0|ConfigNode|Running| 0.0.0.0| 22277|
+| 1|ConfigNode|Running| 0.0.0.0| 22279|
+| 2|ConfigNode|Running| 0.0.0.0| 22281|
+| 3| DataNode|Running|127.0.0.1| 9003|
+| 4| DataNode|Running|127.0.0.1| 9005|
+| 5| DataNode|Running|127.0.0.1| 9007|
++------+----------+-------+---------+------------+
Total line number = 6
It costs 0.011s
```
@@ -274,16 +274,16 @@ 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|Port| 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|
-+--------+------------+------+-------------+------------+----------+----------+---------+----+--------+
++--------+------------+------+-------------+------------+----------+----------+---------+-------+--------+
+|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
```
@@ -293,12 +293,12 @@ It costs 0.032s
```sql
IoTDB> show regions
-+--------+------------+------+-------------+------------+----------+----------+---------+----+------+
-|RegionId| Type|Status|storage group|Series Slots|Time
Slots|DataNodeId| Host|Port| 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|
-+--------+------------+------+-------------+------------+----------+----------+---------+----+------+
++--------+------------+------+-------------+------------+----------+----------+---------+-------+------+
+|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
```
@@ -311,29 +311,29 @@ 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|Port| 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|
-+--------+----------+------+-------------+------------+----------+----------+---------+----+--------+
++--------+----------+------+-------------+------------+----------+----------+---------+-------+--------+
+|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
It costs 0.011s
IoTDB> show schema regions
-+--------+------------+------+-------------+------------+----------+----------+---------+----+--------+
-|RegionId| Type|Status|storage group|Series Slots|Time
Slots|DataNodeId| Host|Port| 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|
-+--------+------------+------+-------------+------------+----------+----------+---------+----+--------+
++--------+------------+------+-------------+------------+----------+----------+---------+-------+--------+
+|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
It costs 0.012s
```
@@ -342,29 +342,29 @@ It costs 0.012s
```
IoTDB> show regions of storage group root.sg
-+--------+------------+------+-------------+------------+----------+----------+---------+----+--------+
-|RegionId| Type|Status|storage group|Series Slots|Time
Slots|DataNodeId| Host|Port| 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|
-+--------+------------+------+-------------+------------+----------+----------+---------+----+--------+
++--------+------------+------+-------------+------------+----------+----------+---------+-------+--------+
+|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> 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|Port| 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|
-+--------+------------+------+--------------+------------+----------+----------+---------+----+--------+
++--------+------------+------+--------------+------------+----------+----------+---------+-------+--------+
+|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
```
diff --git
a/node-commons/src/main/java/org/apache/iotdb/commons/utils/NodeUrlUtils.java
b/node-commons/src/main/java/org/apache/iotdb/commons/utils/NodeUrlUtils.java
index aa727d8769..8dbf8459e3 100644
---
a/node-commons/src/main/java/org/apache/iotdb/commons/utils/NodeUrlUtils.java
+++
b/node-commons/src/main/java/org/apache/iotdb/commons/utils/NodeUrlUtils.java
@@ -72,7 +72,7 @@ public class NodeUrlUtils {
public static TEndPoint parseTEndPointUrl(String endPointUrl) throws
BadNodeUrlException {
String[] split = endPointUrl.split(":");
if (split.length != 2) {
- logger.warn("Bad node url: {}", endPointUrl);
+ logger.warn("Bad node url: {}, please check the IP:PORT inputs",
endPointUrl);
throw new BadNodeUrlException(String.format("Bad node url: %s",
endPointUrl));
}
String ip = split[0];
@@ -81,7 +81,7 @@ public class NodeUrlUtils {
int port = Integer.parseInt(split[1]);
result = new TEndPoint(ip, port);
} catch (NumberFormatException e) {
- logger.warn("Bad node url: {}", endPointUrl);
+ logger.warn("Bad node url: {}, please check the IP:PORT inputs",
endPointUrl);
throw new BadNodeUrlException(String.format("Bad node url: %s",
endPointUrl));
}
return result;
diff --git
a/server/src/main/java/org/apache/iotdb/db/mpp/common/header/ColumnHeaderConstant.java
b/server/src/main/java/org/apache/iotdb/db/mpp/common/header/ColumnHeaderConstant.java
index ef6cf7379d..a1ebb0d55a 100644
---
a/server/src/main/java/org/apache/iotdb/db/mpp/common/header/ColumnHeaderConstant.java
+++
b/server/src/main/java/org/apache/iotdb/db/mpp/common/header/ColumnHeaderConstant.java
@@ -67,7 +67,8 @@ public class ColumnHeaderConstant {
public static final String COLUMN_NODE_TYPE = "NodeType";
public static final String COLUMN_STATUS = "Status";
public static final String COLUMN_HOST = "Host";
- public static final String COLUMN_PORT = "Port";
+ public static final String COLUMN_INTERNAL_PORT = "InternalPort";
+ public static final String COLUMN_RPC_PORT = "RpcPort";
// column names for show functions statement
public static final String COLUMN_FUNCTION_NAME = "function name";
@@ -201,7 +202,7 @@ public class ColumnHeaderConstant {
new ColumnHeader(COLUMN_TIME_SLOTS, TSDataType.INT64),
new ColumnHeader(COLUMN_DATANODE_ID, TSDataType.INT32),
new ColumnHeader(COLUMN_HOST, TSDataType.TEXT),
- new ColumnHeader(COLUMN_PORT, TSDataType.INT32),
+ new ColumnHeader(COLUMN_RPC_PORT, TSDataType.INT32),
new ColumnHeader(COLUMN_ROLE, TSDataType.TEXT));
public static final List<ColumnHeader> showDataNodesColumnHeaders =
@@ -209,7 +210,7 @@ public class ColumnHeaderConstant {
new ColumnHeader(COLUMN_NODE_ID, TSDataType.INT32),
new ColumnHeader(COLUMN_STATUS, TSDataType.TEXT),
new ColumnHeader(COLUMN_HOST, TSDataType.TEXT),
- new ColumnHeader(COLUMN_PORT, TSDataType.INT32),
+ new ColumnHeader(COLUMN_RPC_PORT, TSDataType.INT32),
new ColumnHeader(COLUMN_DATA_REGION_NUM, TSDataType.INT32),
new ColumnHeader(COLUMN_SCHEMA_REGION_NUM, TSDataType.INT32));
@@ -218,7 +219,7 @@ public class ColumnHeaderConstant {
new ColumnHeader(COLUMN_NODE_ID, TSDataType.INT32),
new ColumnHeader(COLUMN_STATUS, TSDataType.TEXT),
new ColumnHeader(COLUMN_HOST, TSDataType.TEXT),
- new ColumnHeader(COLUMN_PORT, TSDataType.INT32),
+ new ColumnHeader(COLUMN_INTERNAL_PORT, TSDataType.INT32),
new ColumnHeader(COLUMN_ROLE, TSDataType.TEXT));
public static final List<ColumnHeader> showClusterColumnHeaders =
@@ -227,7 +228,7 @@ public class ColumnHeaderConstant {
new ColumnHeader(COLUMN_NODE_TYPE, TSDataType.TEXT),
new ColumnHeader(COLUMN_STATUS, TSDataType.TEXT),
new ColumnHeader(COLUMN_HOST, TSDataType.TEXT),
- new ColumnHeader(COLUMN_PORT, TSDataType.INT32));
+ new ColumnHeader(COLUMN_INTERNAL_PORT, TSDataType.INT32));
public static final List<ColumnHeader> showFunctionsColumnHeaders =
ImmutableList.of(
diff --git
a/server/src/main/java/org/apache/iotdb/db/service/DataNodeServerCommandLine.java
b/server/src/main/java/org/apache/iotdb/db/service/DataNodeServerCommandLine.java
index 5fc9c2a022..f32716f0df 100644
---
a/server/src/main/java/org/apache/iotdb/db/service/DataNodeServerCommandLine.java
+++
b/server/src/main/java/org/apache/iotdb/db/service/DataNodeServerCommandLine.java
@@ -188,13 +188,14 @@ public class DataNodeServerCommandLine extends
ServerCommandLine {
.filter(location ->
endPoints.contains(location.getClientRpcEndPoint()))
.collect(Collectors.toList());
} catch (TException e) {
- logger.error("get data node locations failed", e);
+ logger.error("Get data node locations failed", e);
}
if (endPoints.size() != dataNodeLocations.size()) {
logger.error(
- "build DataNode locations error, "
- + "because number of input DataNode({}) NOT EQUALS the number of
fetched DataNodeLocations({}), will return empty locations",
+ "Build DataNode locations error, "
+ + "because number of input DataNode({}) not equals the number of
fetched DataNodeLocations({}), "
+ + "please check your IP:RPC_PORT inputs",
endPoints.size(),
dataNodeLocations.size());
dataNodeLocations.clear();