WARNhttp-worker-103com.facebook.presto.execution.SqlTaskManagerSwitching coordinator affinity fro

    xiaoxiao2022-07-04  116

    背景

    2. 环境

    地址服务说明kylin1.dtwave.dev.localworker节worker节点kylin2.dtwave.dev.localcoordinator调度节点kylin3.dtwave.dev.localworker节点worker节点

    6.1 配置coordinator

    ​ config属性文件etc/config.properties包含Presto服务器的配置。每个Presto服务器都可以充当协调器和工作器,但是专用一台机器来执行协调工作可以在更大的集群上提供最佳性能。

    以下是协调器的最小配置:

    [deploy@kylin2 presto]$ vi etc/config.properties coordinator=true node-scheduler.include-coordinator=false http-server.http.port=9002 query.max-memory=10GB query.max-memory-per-node=2GB query.max-total-memory-per-node=4GB discovery-server.enabled=true discovery.uri=http://192.168.90.61:9002

    6.2 配置worker

    6.2.1 配置启动的服务是worker

    两个机器都要配置。

    这是workers的最小配置:

    [deploy@kylin1 presto]$ vi etc/config.properties coordinator=true node-scheduler.include-coordinator=true http-server.http.port=9002 query.max-memory=5GB query.max-memory-per-node=1GB query.max-total-memory-per-node=2GB discovery.uri=http://192.168.90.61:9002 [deploy@kylin1 presto]$ vi etc/config.properties coordinator=false node-scheduler.include-coordinator=true http-server.http.port=9002 query.max-memory=5GB query.max-memory-per-node=1GB query.max-total-memory-per-node=2GB discovery.uri=http://192.168.90.61:9002

    6.2.2 修改worker的ID

    [deploy@kylin1 presto]$ vi etc/node.properties node.environment=production node.id=4e620341-b3dd-40c1-87e4-1fc2298b45d7 node.data-dir=/opt/third/presto/data [deploy@kylin1 presto]$ vi etc/node.properties node.environment=production node.id=588391e8-b666-4248-bd88-2d4e23c2b662 node.data-dir=/opt/third/presto/data

    这里必须修改node.id的值,保证每个都不一样,建议都是UUID,不然相同的会认为只有一个节点。

    启动后界面如图

    但是后台在刷新日志 warn是怎么回事?

    WARN http-worker-103 com.facebook.presto.execution.SqlTaskManager Switching coordinator affinity from 5tddj to yjzv8 WARN http-worker-71 com.facebook.presto.execution.SqlTaskManager Switching coordinator affinity from yjzv8 to 5tddj WARN http-worker-103 com.facebook.presto.execution.SqlTaskManager Switching coordinator affinity from 5tddj to yjzv8 .....

    只有kylin1.dtwave.dev.local 界节点不刷新warn, 主节点和另外一个warker节点一直在说刷线这个。

    2. 解决

    最终找到原因,是因为集群中启动了两个coordinator,但是却不是HA操作

    ```shell [deploy@kylin1 presto]$ vi etc/config.properties # 这里手误,把false写成true了 coordinator=false node-scheduler.include-coordinator=true http-server.http.port=9002 query.max-memory=5GB query.max-memory-per-node=1GB query.max-total-memory-per-node=2GB discovery.uri=http://192.168.90.61:9002 。。。。
    最新回复(0)