【问题标题】:Presto API to get active workersPresto API 获取活跃的工作人员
【发布时间】:2021-01-06 05:44:32
【问题描述】:

我想使用 Presto API 来获取活跃工作人员的数量,类似于 PrestoUI 中提供的信息。

我想使用类似于(不包含此信息)的 API:

  1. https://presto/v1/status
  2. https://presto/v1/jmx

【问题讨论】:

    标签: api rest presto trino


    【解决方案1】:

    在最新的 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)
    

    【讨论】:

    • 有什么办法让节点正常运行?
    猜你喜欢
    • 2021-01-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-10-08
    相关资源
    最近更新 更多