【原創】大叔經驗分享(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

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM