Skip to content

Commit

Permalink
Remove http port in show hosts (#2498)
Browse files Browse the repository at this point in the history
  • Loading branch information
foesa-yang authored Jan 17, 2023
1 parent d45f692 commit 582b8f3
Show file tree
Hide file tree
Showing 8 changed files with 101 additions and 101 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@

```ngql
nebula> SHOW HOSTS;
+------------------+------+-----------+----------+--------------+---------------------- +------------------------+---------+
| Host | Port | HTTP port | Status | Leader count | Leader distribution | Partition distribution | Version |
+------------------+------+-----------+----------+--------------+---------------------- +------------------------+---------+
| "192.168.10.100" | 9779 | 19669 | "ONLINE" | 0 | "No valid partition" | "No valid partition" | "3.1.0" |
| "192.168.10.101" | 9779 | 19669 | "ONLINE" | 0 | "No valid partition" | "No valid partition" | "3.1.0" |
| "192.168.10.102" | 9779 | 19669 | "ONLINE" | 0 | "No valid partition" | "No valid partition" | "3.1.0" |
+------------------+------+-----------+----------+--------------+---------------------- +------------------------+---------+
+------------------+------+----------+--------------+---------------------- +------------------------+---------+
| Host | Port | Status | Leader count | Leader distribution | Partition distribution | Version |
+------------------+------+----------+--------------+---------------------- +------------------------+---------+
| "192.168.10.100" | 9779 | "ONLINE" | 0 | "No valid partition" | "No valid partition" | "{{nebula.release}}" |
| "192.168.10.101" | 9779 | "ONLINE" | 0 | "No valid partition" | "No valid partition" | "{{nebula.release}}" |
| "192.168.10.102" | 9779 | "ONLINE" | 0 | "No valid partition" | "No valid partition" | "{{nebula.release}}" |
+------------------+------+----------+--------------+---------------------- +------------------------+---------+
```

在返回结果的 **Status** 列,可以看到所有 Storage 主机都在线。
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ SHOW HOSTS [GRAPH | STORAGE | META];

```ngql
nebula> SHOW HOSTS;
+-------------+-------+-----------+----------+--------------+----------------------------------+------------------------------+---------+
| Host | Port | HTTP port | Status | Leader count | Leader distribution | Partition distribution | Version |
+-------------+-------+-----------+----------+--------------+----------------------------------+------------------------------+---------+
| "storaged0" | 9779 | 19779 | "ONLINE" | 8 | "docs:5, basketballplayer:3" | "docs:5, basketballplayer:3" | "{{nebula.release}}" |
| "storaged1" | 9779 | 19779 | "ONLINE" | 9 | "basketballplayer:4, docs:5" | "docs:5, basketballplayer:4" | "{{nebula.release}}" |
| "storaged2" | 9779 | 19779 | "ONLINE" | 8 | "basketballplayer:3, docs:5" | "docs:5, basketballplayer:3" | "{{nebula.release}}" |
+-------------+-------+-----------+----------+--------------+----------------------------------+------------------------------+---------+
+-------------+-------+----------+--------------+----------------------------------+------------------------------+---------+
| Host | Port | Status | Leader count | Leader distribution | Partition distribution | Version |
+-------------+-------+----------+--------------+----------------------------------+------------------------------+---------+
| "storaged0" | 9779 | "ONLINE" | 8 | "docs:5, basketballplayer:3" | "docs:5, basketballplayer:3" | "{{nebula.release}}" |
| "storaged1" | 9779 | "ONLINE" | 9 | "basketballplayer:4, docs:5" | "docs:5, basketballplayer:4" | "{{nebula.release}}" |
| "storaged2" | 9779 | "ONLINE" | 8 | "basketballplayer:3, docs:5" | "docs:5, basketballplayer:3" | "{{nebula.release}}" |
+-------------+-------+----------+--------------+----------------------------------+------------------------------+---------+
nebula> SHOW HOSTS GRAPH;
+-----------+------+----------+---------+--------------+---------+
Expand Down
28 changes: 14 additions & 14 deletions docs-2.0/3.ngql-guide/9.space-statements/1.create-space.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,25 +102,25 @@ nebula> SHOW CREATE SPACE my_space_4;

```ngql
nebula> SHOW HOSTS;
+-------------+------+-----------+----------+--------------+--------------------------------+--------------------------------+---------+
| Host | Port | HTTP port | Status | Leader count | Leader distribution | Partition distribution | Version |
+-------------+------+-----------+----------+--------------+--------------------------------+--------------------------------+---------+
| "storaged0" | 9779 | 19779 | "ONLINE" | 8 | "basketballplayer:3, test:5" | "basketballplayer:10, test:10" | "3.1.0" |
| "storaged1" | 9779 | 19779 | "ONLINE" | 9 | "basketballplayer:4, test:5" | "basketballplayer:10, test:10" | "3.1.0" |
| "storaged2" | 9779 | 19779 | "ONLINE" | 3 | "basketballplayer:3" | "basketballplayer:10, test:10" | "3.1.0" |
+-------------+------+-----------+----------+--------------+--------------------------------+--------------------------------+---------+
+-------------+------+----------+--------------+--------------------------------+--------------------------------+---------+
| Host | Port | Status | Leader count | Leader distribution | Partition distribution | Version |
+-------------+------+----------+--------------+--------------------------------+--------------------------------+---------+
| "storaged0" | 9779 | "ONLINE" | 8 | "basketballplayer:3, test:5" | "basketballplayer:10, test:10" | "3.1.0" |
| "storaged1" | 9779 | "ONLINE" | 9 | "basketballplayer:4, test:5" | "basketballplayer:10, test:10" | "3.1.0" |
| "storaged2" | 9779 | "ONLINE" | 3 | "basketballplayer:3" | "basketballplayer:10, test:10" | "3.1.0" |
+-------------+------+----------+--------------+--------------------------------+--------------------------------+---------+
```

如果需要均衡负载,请执行如下命令:

```ngql
nebula> BALANCE LEADER;
nebula> SHOW HOSTS;
+-------------+------+-----------+----------+--------------+--------------------------------+--------------------------------+---------+
| Host | Port | HTTP port | Status | Leader count | Leader distribution | Partition distribution | Version |
+-------------+------+-----------+----------+--------------+--------------------------------+--------------------------------+---------+
| "storaged0" | 9779 | 19779 | "ONLINE" | 7 | "basketballplayer:3, test:4" | "basketballplayer:10, test:10" | "3.1.0" |
| "storaged1" | 9779 | 19779 | "ONLINE" | 7 | "basketballplayer:4, test:3" | "basketballplayer:10, test:10" | "3.1.0" |
| "storaged2" | 9779 | 19779 | "ONLINE" | 6 | "basketballplayer:3, test:3" | "basketballplayer:10, test:10" | "3.1.0" |
+-------------+------+-----------+----------+--------------+--------------------------------+--------------------------------+---------+
+-------------+------+----------+--------------+--------------------------------+--------------------------------+---------+
| Host | Port | Status | Leader count | Leader distribution | Partition distribution | Version |
+-------------+------+----------+--------------+--------------------------------+--------------------------------+---------+
| "storaged0" | 9779 | "ONLINE" | 7 | "basketballplayer:3, test:4" | "basketballplayer:10, test:10" | "{{nebula.release}}" |
| "storaged1" | 9779 | "ONLINE" | 7 | "basketballplayer:4, test:3" | "basketballplayer:10, test:10" | "{{nebula.release}}" |
| "storaged2" | 9779 | "ONLINE" | 6 | "basketballplayer:3, test:3" | "basketballplayer:10, test:10" | "{{nebula.release}}" |
+-------------+------+----------+--------------+--------------------------------+--------------------------------+---------+
```
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,13 @@

```bash
nebula> SHOW HOSTS;
+-------------+------+----------+--------------+----------------------+------------------------+---------+
| Host | Port | Status | Leader count | Leader distribution | Partition distribution | Version |
+-------------+------+-----------+----------+--------------+----------------------+------------------------+---------+
| Host | Port | HTTP port | Status | Leader count | Leader distribution | Partition distribution | Version |
+-------------+------+-----------+----------+--------------+----------------------+------------------------+---------+
| "storaged0" | 9779 | 19779 | "ONLINE" | 0 | "No valid partition" | "No valid partition" | "x.x.x" |
| "storaged1" | 9779 | 19779 | "ONLINE" | 0 | "No valid partition" | "No valid partition" | "x.x.x" |
| "storaged2" | 9779 | 19779 | "ONLINE" | 0 | "No valid partition" | "No valid partition" | "x.x.x" |
+-------------+------+-----------+----------+--------------+----------------------+------------------------+---------+
| "storaged0" | 9779 | "ONLINE" | 0 | "No valid partition" | "No valid partition" | "{{nebula.release}}" |
| "storaged1" | 9779 | "ONLINE" | 0 | "No valid partition" | "No valid partition" | "{{nebula.release}}" |
| "storaged2" | 9779 | "ONLINE" | 0 | "No valid partition" | "No valid partition" | "{{nebula.release}}" |
+-------------+------+----------+--------------+----------------------+------------------------+---------+
```

执行两次`exit`可以退出容器。
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -303,13 +303,13 @@ Welcome to NebulaGraph!
> ADD HOSTS 192.168.10.111:9779, 192.168.10.112:9779, 192.168.10.113:9779, 192.168.10.114:9779, 192.168.10.115:9779;
> SHOW HOSTS;
+------------------+------+----------+--------------+----------------------+------------------------+---------+
| Host | Port | Status | Leader count | Leader distribution | Partition distribution | Version |
+------------------+------+-----------+----------+--------------+----------------------+------------------------+---------+
| Host | Port | HTTP port | Status | Leader count | Leader distribution | Partition distribution | Version |
+------------------+------+-----------+----------+--------------+----------------------+------------------------+---------+
| "192.168.10.111" | 9779 | 19779 | "ONLINE" | 0 | "No valid partition" | "No valid partition" | "3.1.0" |
| "192.168.10.112" | 9779 | 19779 | "ONLINE" | 0 | "No valid partition" | "No valid partition" | "3.1.0" |
| "192.168.10.113" | 9779 | 19779 | "ONLINE" | 0 | "No valid partition" | "No valid partition" | "3.1.0" |
| "192.168.10.114" | 9779 | 19779 | "ONLINE" | 0 | "No valid partition" | "No valid partition" | "3.1.0" |
| "192.168.10.115" | 9779 | 19779 | "ONLINE" | 0 | "No valid partition" | "No valid partition" | "3.1.0" |
+------------------+------+-----------+----------+--------------+----------------------+------------------------+---------+
| "192.168.10.111" | 9779 | "ONLINE" | 0 | "No valid partition" | "No valid partition" | "{{nebula.release}}" |
| "192.168.10.112" | 9779 | "ONLINE" | 0 | "No valid partition" | "No valid partition" | "{{nebula.release}}" |
| "192.168.10.113" | 9779 | "ONLINE" | 0 | "No valid partition" | "No valid partition" | "{{nebula.release}}" |
| "192.168.10.114" | 9779 | "ONLINE" | 0 | "No valid partition" | "No valid partition" | "{{nebula.release}}" |
| "192.168.10.115" | 9779 | "ONLINE" | 0 | "No valid partition" | "No valid partition" | "{{nebula.release}}" |
+------------------+------+----------+--------------+----------------------+------------------------+---------+
```
Loading

0 comments on commit 582b8f3

Please sign in to comment.