跳转至

SHOW HOSTS

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

语法

SHOW HOSTS [GRAPH/STORAGE/META];

示例

nebula> SHOW HOSTS;
+-------------+-------+----------+--------------+----------------------------------+-----------------------------+
| Host        | Port  | Status   | Leader count | Leader distribution              | Partition distribution      |
+-------------+-------+----------+--------------+----------------------------------+-----------------------------+
| "storaged0" | 9779  | "ONLINE" | 8            | "docs:5, basketballplayer:3"     | "docs:5, basketballplayer:3"|
+-------------+-------+----------+--------------+----------------------------------+-----------------------------+
| "storaged1" | 9779  | "ONLINE" | 9            | "basketballplayer:4, docs:5"     | "docs:5, basketballplayer:4"|
+-------------+-------+----------+--------------+----------------------------------+-----------------------------+
| "storaged2" | 9779  | "ONLINE" | 8            | "basketballplayer:3, docs:5"     | "docs:5, basketballplayer:3"|
+-------------+-------+----------+--------------+----------------------------------+-----------------------------+
Got 3 rows (time spent 866/1411 us)

nebula> SHOW HOSTS GRAPH;
+-------------+------+----------+---------+--------------+
| Host        | Port | Status   | Role    | Git Info Sha |
+-------------+------+----------+---------+--------------+
| "12.16.2.3" | 9669 | "ONLINE" | "GRAPH" | "761f22b"    |

nebula> SHOW HOSTS STORAGE;
+-------------+------+----------+-----------+--------------+
| Host        | Port | Status   | Role      | Git Info Sha |
+-------------+------+----------+-----------+--------------+
| "12.16.2.3" | 9779 | "ONLINE" | "STORAGE" | "761f22b"    |

nebula> SHOW HOSTS META;
+-------------+------+----------+--------+--------------+
| Host        | Port | Status   | Role   | Git Info Sha |
+-------------+------+----------+--------+--------------+
| "12.16.2.3" | 9559 | "ONLINE" | "META" | "761f22b"    |

最后更新: April 13, 2021
Back to top