【原创】大叔经验分享(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

 

转载于:https://www.cnblogs.com/barneywill/p/10940920.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值