SHOW HOSTS

SHOW HOSTS语句显示由Meta服务注册的Graph、Storage、Meta主机。

语法

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

示例

  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. +-------------+-------+----------+--------------+----------------------------------+-----------------------------+
  7. | "storaged1" | 9779 | "ONLINE" | 9 | "basketballplayer:4, docs:5" | "docs:5, basketballplayer:4"|
  8. +-------------+-------+----------+--------------+----------------------------------+-----------------------------+
  9. | "storaged2" | 9779 | "ONLINE" | 8 | "basketballplayer:3, docs:5" | "docs:5, basketballplayer:3"|
  10. +-------------+-------+----------+--------------+----------------------------------+-----------------------------+
  11. Got 3 rows (time spent 866/1411 us)
  12. nebula> SHOW HOSTS GRAPH;
  13. +-------------+------+----------+---------+--------------+
  14. | Host | Port | Status | Role | Git Info Sha |
  15. +-------------+------+----------+---------+--------------+
  16. | "12.16.2.3" | 9669 | "ONLINE" | "GRAPH" | "761f22b" |
  17. nebula> SHOW HOSTS STORAGE;
  18. +-------------+------+----------+-----------+--------------+
  19. | Host | Port | Status | Role | Git Info Sha |
  20. +-------------+------+----------+-----------+--------------+
  21. | "12.16.2.3" | 9779 | "ONLINE" | "STORAGE" | "761f22b" |
  22. nebula> SHOW HOSTS META;
  23. +-------------+------+----------+--------+--------------+
  24. | Host | Port | Status | Role | Git Info Sha |
  25. +-------------+------+----------+--------+--------------+
  26. | "12.16.2.3" | 9559 | "ONLINE" | "META" | "761f22b" |