Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove http port in show hosts #2498

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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