【发布时间】:2021-01-06 05:44:32
【问题描述】:
我想使用 Presto API 来获取活跃工作人员的数量,类似于 PrestoUI 中提供的信息。
我想使用类似于(不包含此信息)的 API:
- https://presto/v1/status
- https://presto/v1/jmx
【问题讨论】:
我想使用 Presto API 来获取活跃工作人员的数量,类似于 PrestoUI 中提供的信息。
我想使用类似于(不包含此信息)的 API:
【问题讨论】:
在最新的 Trino(以前的 Presto SQL)版本中,无法从集群外部自省工作人员的 AFAIK,但您可以使用 SQL 获取列表:
presto> SELECT * FROM system.runtime.nodes;
node_id | http_uri | node_version | coordinator | state
---------------+------------------------+------------------+-------------+--------
presto-worker | http://172.20.0.3:8081 | 347-137-g4945abe | false | active
presto-master | http://172.20.0.4:8080 | 347-137-g4945abe | true | active
(2 rows)
【讨论】: