SHOW HOSTS

SHOW HOSTS语句可以显示Graph、Storage、Meta服务主机信息、版本信息。

语法

  1. SHOW HOSTS [GRAPH | STORAGE | META];

不添加服务名,直接使用SHOW HOSTS,会显示Storage服务主机信息,以及leader总数、leader分布和分片分布。

示例

  1. nebula> SHOW HOSTS;
  2. +-------------+-------+----------+--------------+----------------------------------+------------------------------+
  3. | Host | Port | Status | Leader count | Leader distribution | Partition distribution |
  4. +-------------+-------+----------+--------------+----------------------------------+------------------------------+
  5. | "storaged0" | 9779 | "ONLINE" | 8 | "docs:5, basketballplayer:3" | "docs:5, basketballplayer:3" |
  6. | "storaged1" | 9779 | "ONLINE" | 9 | "basketballplayer:4, docs:5" | "docs:5, basketballplayer:4" |
  7. | "storaged2" | 9779 | "ONLINE" | 8 | "basketballplayer:3, docs:5" | "docs:5, basketballplayer:3" |
  8. +-------------+-------+----------+--------------+----------------------------------+------------------------------+
  9. nebula> SHOW HOSTS GRAPH;
  10. +-----------+------+----------+---------+---------------+--------+
  11. | Host | Port | Status | Role | Git Info Sha | Version |
  12. +-----------+------+----------+---------+--------------+---------+
  13. | "graphd" | 9669 | "ONLINE" | "GRAPH" | "3ba41bd" | "2.6.0" |
  14. | "graphd1" | 9669 | "ONLINE" | "GRAPH" | "3ba41bd" | "2.6.0" |
  15. | "graphd2" | 9669 | "ONLINE" | "GRAPH" | "3ba41bd" | "2.6.0" |
  16. +-----------+------+----------+---------+--------------+---------+
  17. nebula> SHOW HOSTS STORAGE;
  18. +-------------+------+----------+-----------+--------------+---------+
  19. | Host | Port | Status | Role | Git Info Sha | Version |
  20. +-------------+------+----------+-----------+--------------+---------+
  21. | "storaged0" | 9779 | "ONLINE" | "STORAGE" | "3ba41bd" | "2.6.0" |
  22. | "storaged1" | 9779 | "ONLINE" | "STORAGE" | "3ba41bd" | "2.6.0" |
  23. | "storaged2" | 9779 | "ONLINE" | "STORAGE" | "3ba41bd" | "2.6.0" |
  24. +-------------+------+----------+-----------+--------------+---------+
  25. nebula> SHOW HOSTS META;
  26. +----------+------+----------+--------+--------------+---------+
  27. | Host | Port | Status | Role | Git Info Sha | Version |
  28. +----------+------+----------+--------+--------------+---------+
  29. | "metad2" | 9559 | "ONLINE" | "META" | "3ba41bd" | "2.6.0" |
  30. | "metad0" | 9559 | "ONLINE" | "META" | "3ba41bd" | "2.6.0" |
  31. | "metad1" | 9559 | "ONLINE" | "META" | "3ba41bd" | "2.6.0" |
  32. +----------+------+----------+--------+--------------+---------+

最后更新: November 1, 2021