• 【原创】大叔经验分享(64)cloudera manager agent启动组件进程过程


    概述

    The Agent is started by init.d at start-up. It, in turn, contacts the Cloudera Manager Server and determines which processes should be running. The Agent is monitored as part of Cloudera Manager's host monitoring. If the Agent stops heartbeating, the host is marked as having bad health.

    One of the Agent's main responsibilities is to start and stop processes. When the Agent detects a new process from the Server heartbeat, the Agent creates a directory for it in /var/run/cloudera-scm-agent and unpacks the configuration. It then contacts supervisord, which starts the process.

    1 生成配置文件目录

    [25/May/2019 16:16:36 +0000] 27716 MainThread agent        INFO     Created /opt/cloudera-manager/cm-5.16.1/run/cloudera
    -scm-agent/process/333-kudu-KUDU_TSERVER
    [25/May/2019 16:16:36 +0000] 27716 MainThread agent        INFO     Chowning /opt/cloudera-manager/cm-5.16.1/run/clouder
    a-scm-agent/process/333-kudu-KUDU_TSERVER to kudu (982) kudu (978)
    [25/May/2019 16:16:36 +0000] 27716 MainThread agent        INFO     Chmod'ing /opt/cloudera-manager/cm-5.16.1/run/cloude
    ra-scm-agent/process/333-kudu-KUDU_TSERVER to 0751
    [25/May/2019 16:16:36 +0000] 27716 MainThread agent        INFO     Created /opt/cloudera-manager/cm-5.16.1/run/cloudera
    -scm-agent/process/333-kudu-KUDU_TSERVER/logs
    [25/May/2019 16:16:36 +0000] 27716 MainThread agent        INFO     Chowning /opt/cloudera-manager/cm-5.16.1/run/clouder
    a-scm-agent/process/333-kudu-KUDU_TSERVER/logs to kudu (982) kudu (978)
    [25/May/2019 16:16:36 +0000] 27716 MainThread agent        INFO     Chmod'ing /opt/cloudera-manager/cm-5.16.1/run/cloude
    ra-scm-agent/process/333-kudu-KUDU_TSERVER/logs to 0751
    [25/May/2019 16:16:36 +0000] 27716 MainThread process      INFO     [333-kudu-KUDU_TSERVER] Refreshing process files: No
    ne
    [25/May/2019 16:16:36 +0000] 27716 MainThread __init__     INFO     Extracted 9 files and 0 dirs to /opt/cloudera-manage
    r/cm-5.16.1/run/cloudera-scm-agent/process/333-kudu-KUDU_TSERVER.
    [25/May/2019 16:16:36 +0000] 27716 MainThread process      INFO     reading limits: {u'limit_memlock': None, u'limit_fds
    ': None}
    [25/May/2019 16:16:36 +0000] 27716 MainThread process      INFO     [333-kudu-KUDU_TSERVER] Launching process. one-off F
    alse, command csd/csd.sh, args [u'tserver']

    目录:

    /opt/cloudera-manager/cm-5.16.1/run/cloudera-scm-agent/process/$index_component_config

    配置目录中有proc.json文件包含进程的详细信息,包括启动命令和参数等; 

    python代码目录

    /opt/cloudera-manager/cm-5.16.1/lib64/cmf/agent/build/env/lib/python2.7/site-packages/cmf-5.16.1-py2.7.egg/cmf/

    agent.py
    process.py

    write_configuration

    2 设置环境变量

    CONF_DIR=/opt/cloudera-manager/cm-5.16.1/run/cloudera-scm-agent/process/341-hdfs-DATANODE
    CMF_CONF_DIR=/opt/cloudera-manager/cm-5.16.1/etc/cloudera-scm-agent

    /opt/cloudera/parcels/CDH-5.16.1-1.cdh5.16.1.p0.3/meta/cdh_env.sh

    3 启动

    /opt/cloudera/parcels/CDH-5.16.1-1.cdh5.16.1.p0.3/lib/hadoop-hdfs/bin/hdfs --config /opt/cloudera-manager/cm-5.16.1/run/cloudera-scm-agent/process/341-hdfs-DATANODE datanode

    4 其他

    agent uuid目录

    /opt/cloudera-manager/cm-5.16.1/lib/cloudera-scm-agent/

    参考:
    https://www.cloudera.com/documentation/enterprise/5-6-x/topics/admin_cloudera_manager_agents.html

  • 相关阅读:
    第九十一天 how can I 坚持 技术-永远的技术
    第九十天 how can I 坚持
    Java控制台中输入中文输出乱码的解决办法
    【体系结构】转移预测器设计与比较1
    Ubuntu 13.04 用Sublime Text 2 编译运行 JAVA
    HDU 4605 Magic Ball Game (在线主席树|| 离线 线段树)
    个人重构机房收费系统之报表
    快速排序的递归和非递归实现
    HDU 3721 Building Roads (2010 Asia Tianjin Regional Contest)
    体验决定深度,知识决定广度。你的人生是什么呢? 操蛋和扯蛋没必要纠结 唯有继续
  • 原文地址:https://www.cnblogs.com/barneywill/p/10940920.html
Copyright © 2020-2023  润新知