SHOW PARTS

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

语法

  1. SHOW PARTS [<part_id>];

示例

  1. nebula> SHOW PARTS;
  2. +--------------+--------------------+--------------------+-------+
  3. | Partition ID | Leader | Peers | Losts |
  4. +--------------+--------------------+--------------------+-------+
  5. | 1 | "192.168.2.1:9779" | "192.168.2.1:9779" | "" |
  6. +--------------+--------------------+--------------------+-------+
  7. | 2 | "192.168.2.2:9779" | "192.168.2.2:9779" | "" |
  8. +--------------+--------------------+--------------------+-------+
  9. | 3 | "192.168.2.3:9779" | "192.168.2.3:9779" | "" |
  10. +--------------+--------------------+--------------------+-------+
  11. | 4 | "192.168.2.1:9779" | "192.168.2.1:9779" | "" |
  12. +--------------+--------------------+--------------------+-------+
  13. | 5 | "192.168.2.2:9779" | "192.168.2.2:9779" | "" |
  14. +--------------+--------------------+--------------------+-------+
  15. | 6 | "192.168.2.3:9779" | "192.168.2.3:9779" | "" |
  16. +--------------+--------------------+--------------------+-------+
  17. | 7 | "192.168.2.1:9779" | "192.168.2.1:9779" | "" |
  18. +--------------+--------------------+--------------------+-------+
  19. | 8 | "192.168.2.2:9779" | "192.168.2.2:9779" | "" |
  20. +--------------+--------------------+--------------------+-------+
  21. | 9 | "192.168.2.3:9779" | "192.168.2.3:9779" | "" |
  22. +--------------+--------------------+--------------------+-------+
  23. | 10 | "192.168.2.1:9779" | "192.168.2.1:9779" | "" |
  24. +--------------+--------------------+--------------------+-------+
  25. nebula> SHOW PARTS 1;
  26. +--------------+--------------------+--------------------+-------+
  27. | Partition ID | Leader | Peers | Losts |
  28. +--------------+--------------------+--------------------+-------+
  29. | 1 | "192.168.2.1:9779" | "192.168.2.1:9779" | "" |
  30. +--------------+--------------------+--------------------+-------+

返回结果的说明如下:

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

最后更新: August 12, 2021