更新时间:2024-11-26 GMT+08:00
分享

JobGateway手动更新服务客户端

本章节适用于MRS 3.3.1及之后版本。

操作场景

该操作指导用户在MRS集群添加多服务更新服务客户端失败时,手动更新客户端。

前提条件

  • Manager上已成功添加服务。
  • 仅适用于Spark 、Hive 、Flink服务。

操作步骤

  1. 登录Manager页面,选择“集群 > 服务 > JobGateway > 实例”,查看所有JobServer实例节点IP。
  2. 获取部署了JobServer的节点中,IP最小的节点(以下简称“最小IP节点”)。若最小IP节点更新服务客户端失败,执行3, 否则执行4

    • 若JobServer部署节点IP为:192.168.0.192、192.168.0.168、192.168.0.23 , 则最小IP为192.168.0.23。
    • 脚本支持一次性更新一个或多个服务客户端。

  1. 以omm用户登录最小IP节点,执行更新服务客户端的脚本。

    cd ${BIGDATA_HOME}/FusionInsight_JobGateway_*/install/FusionInsight_JobGateway-*/adapter/script

    dos2unix update-multi-service-client.sh

    sh update-multi-service-client.sh 服务1 服务2 ……

  2. 以omm用户登录其他更新服务客户端失败的节点上分别执行如下命令:

    TIME_RECORD_FILE=${BIGDATA_HOME}/FusionInsight_JobGateway*/install/FusionInsight-JobGateway*/job-gateway/job-server/tmp/multi-service-update-time

    date +"%Y-%m-%d %H:%M:%S" > "${TIME_RECORD_FILE}"

    cat ${TIME_RECORD_FILE} (确保文件生成并写入时间)

    cd ${BIGDATA_HOME}/FusionInsight_JobGateway_*/install/FusionInsight_JobGateway-*/adapter/script

    dos2unix update-multi-service-client.sh

    sh update-multi-service-client.sh 服务1 服务2 ……

    例如

    更新Hive-1 Spark-1服务客户端时部分节点更新失败,其中最小IP节点更新失败。修复如下:

    • 在最小IP节点执行更新服务客户端脚本:

      cd /opt/Bigdata/FusionInsight_JobGateway_8.5.0/install/FusionInsight-JobGateway-1.0.0/adapter/script

      dos2unix update-multi-service-client.sh

      sh update-multi-service-client.sh Hive-1 Spark-1

      update-multi-service-client.sh: line 164: warning: command substitution: ignored null byte in input
      Warning: Permanently added '192.168.234.117' (ED25519) to the list of known hosts.
      
      Warning: Permanently added '192.168.234.117' (ED25519) to the list of known hosts.
      
      Warning: Permanently added '192.168.234.243' (ED25519) to the list of known hosts.
      
      Warning: Permanently added '192.168.234.243' (ED25519) to the list of known hosts.
      
      Start to access REST API.
      Warning: Permanently added '192.168.234.117' (ED25519) to the list of known hosts.
      
      FusionInsight_Cluster_1_Services_Client.tar                                         100% 1566MB 235.8MB/s   00:06
    • 在其他失败的节点上分别执行如下操作:

      TIME_RECORD_FILE=${BIGDATA_HOME}/FusionInsight_JobGateway_8.5.0/install/FusionInsight-JobGateway-1.0.0/job-gateway/job-server/tmp/multi-service-update-time

      date +"%Y-%m-%d %H:%M:%S" > "${TIME_RECORD_FILE}"

      cat ${TIME_RECORD_FILE}

      2024-03-19 18:02:50

      cd /opt/Bigdata/FusionInsight_JobGateway_8.5.0/install/FusionInsight-JobGateway-1.0.0/adapter/script

      dos2unix update-multi-service-client.sh

      sh update-multi-service-client.sh Hive-1 Spark-1

      update-multi-service-client.sh: line 163: warning: command substitution: ignored null byte in input
      Warning: Permanently added '192.168.234.117' (ED25519) to the list of known hosts.
      
      Warning: Permanently added '192.168.234.117' (ED25519) to the list of known hosts.
      
      Warning: Permanently added '192.168.234.167' (ED25519) to the list of known hosts.
      
      Warning: Permanently added '192.168.234.167' (ED25519) to the list of known hosts.
      
      Warning: Permanently added '192.168.234.167' (ED25519) to the list of known hosts.
      
      FusionInsight_Cluster_1_Services_Client.tar                                         100% 1566MB 378.2MB/s   00:04    
      Warning: Permanently added '192.168.234.167' (ED25519) to the list of known hosts.
      
      Warning: Permanently added '192.168.234.167' (ED25519) to the list of known hosts.

  3. 删除所有JobServer所在节点时间戳,需要在所有的JobServer节点执行如下命令:

    TIME_RECORD_FILE=${BIGDATA_HOME}/FusionInsight_JobGateway*/install/FusionInsight-JobGateway*/job-gateway/job-server/tmp/multi-service-update-time

    rm -f ${TIME_RECORD_FILE}

相关文档