跳转至

SHOW PARTSGraph

SHOW PARTS语句显示图空间中指定分片或所有分片的信息。

语法Graph

SHOW PARTS [<part_id>];

示例Graph

nebula> SHOW PARTS;
+--------------+--------------------+--------------------+-------+
| Partition ID | Leader             | Peers              | Losts |
+--------------+--------------------+--------------------+-------+
| 1            | "192.168.2.1:9779" | "192.168.2.1:9779" | ""    |
+--------------+--------------------+--------------------+-------+
| 2            | "192.168.2.2:9779" | "192.168.2.2:9779" | ""    |
+--------------+--------------------+--------------------+-------+
| 3            | "192.168.2.3:9779" | "192.168.2.3:9779" | ""    |
+--------------+--------------------+--------------------+-------+
| 4            | "192.168.2.1:9779" | "192.168.2.1:9779" | ""    |
+--------------+--------------------+--------------------+-------+
| 5            | "192.168.2.2:9779" | "192.168.2.2:9779" | ""    |
+--------------+--------------------+--------------------+-------+
| 6            | "192.168.2.3:9779" | "192.168.2.3:9779" | ""    |
+--------------+--------------------+--------------------+-------+
| 7            | "192.168.2.1:9779" | "192.168.2.1:9779" | ""    |
+--------------+--------------------+--------------------+-------+
| 8            | "192.168.2.2:9779" | "192.168.2.2:9779" | ""    |
+--------------+--------------------+--------------------+-------+
| 9            | "192.168.2.3:9779" | "192.168.2.3:9779" | ""    |
+--------------+--------------------+--------------------+-------+
| 10           | "192.168.2.1:9779" | "192.168.2.1:9779" | ""    |
+--------------+--------------------+--------------------+-------+

nebula> SHOW PARTS 1;
+--------------+--------------------+--------------------+-------+
| Partition ID | Leader             | Peers              | Losts |
+--------------+--------------------+--------------------+-------+
| 1            | "192.168.2.1:9779" | "192.168.2.1:9779" | ""    |
+--------------+--------------------+--------------------+-------+

返回结果的说明如下:

参数 说明
Partition ID 存储分片的ID
Leader 分片对应的Raft leader副本的信息,包括IP地址与服务端口
Peers 分片对应的所有副本(leader与follower)的信息,包括IP地址与服务端口
Losts 分片对应的处于离线状态的副本信息,包括IP地址和服务端口

最后更新: August 12, 2021
Back to top