Hadoop数据收集器
Data Infrastructure Insights使用此数据收集器从 Hadoop 收集指标。
安装
- 
从*可观察性 > 收集器*中,单击*+数据收集器*。选择 Hadoop。 选择安装 Telegraf 代理的操作系统或平台。 
- 
如果您尚未安装用于收集的代理,或者您希望为不同的操作系统或平台安装代理,请单击“显示说明”以展开"代理安装"指示。 
- 
选择用于此数据收集器的代理访问密钥。您可以通过单击 + 代理访问密钥 按钮添加新的代理访问密钥。最佳实践:仅当您想要对数据收集器进行分组(例如按操作系统/平台)时才使用不同的代理访问密钥。 
- 
按照配置步骤配置数据收集器。说明根据您用于收集数据的操作系统或平台的类型而有所不同。 
 
 
设置
完整的 Hadoop 部署涉及以下组件:
- 
NameNode:Hadoop 分布式文件系统 (HDFS) 主系统。协调一系列 DataNode。 
- 
辅助 NameNode:主 NameNode 的温故障转移。在 Hadoop 中,向 NameNode 的提升不会自动发生。辅助 NameNode 收集来自 NameNode 的信息,以便在需要时进行提升。 
- 
DataNode:数据的实际所有者。 
- 
ResourceManager:计算主系统(Yarn)。协调一系列 NodeManager。 
- 
NodeManager:用于计算的资源。应用程序运行的实际位置。 
- 
JobHistoryServer:负责处理所有与作业历史相关的请求。 
Hadoop插件基于telegraf的Jolokia插件。由于需要从所有 Hadoop 组件收集信息,因此需要在所有组件上配置并通过 Jolokia 公开 JMX。
兼容性
配置是针对 Hadoop 版本 2.9.2 开发的。
设置
鬼椒特效罐
对于所有单个组件,必须下载 Jolokia 代理 jar 文件的版本。测试的版本是"Jolokia代理 1.6.0"。
以下说明假设下载的 jar 文件(jolokia-jvm-1.6.0-agent.jar)位于“/opt/hadoop/lib/”位置下。
名称节点
要配置 NameNode 以公开 Jolokia API,您可以在 <HADOOP_HOME>/etc/hadoop/hadoop-env.sh 中设置以下内容:
export HADOOP_NAMENODE_OPTS="$HADOOP_NAMENODE_OPTS -javaagent:/opt/hadoop/lib/jolokia-jvm-1.6.0-agent.jar=port=7800,host=0.0.0.0 -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=8000 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.password.file=$HADOOP_HOME/conf/jmxremote.password" You can choose a different port for JMX (8000 above) and Jolokia (7800). If you have an internal IP to lock Jolokia onto you can replace the "catch all" 0.0.0.0 by your own IP. Notice this IP needs to be accessible from the telegraf plugin. You can use the option '-Dcom.sun.management.jmxremote.authenticate=false' if you don't want to authenticate. Use at your own risk.
辅助 NameNode
要配置辅助 NameNode 以公开 Jolokia API,您可以在 <HADOOP_HOME>/etc/hadoop/hadoop-env.sh 中设置以下内容:
export HADOOP_SECONDARYNAMENODE_OPTS="$HADOOP_SECONDARYNAMENODE_OPTS -javaagent:/opt/hadoop/lib/jolokia-jvm-1.6.0-agent.jar=port=7802,host=0.0.0.0 -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=8002 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.password.file=$HADOOP_HOME/conf/jmxremote.password" You can choose a different port for JMX (8002 above) and Jolokia (7802). If you have an internal IP to lock Jolokia onto you can replace the "catch all" 0.0.0.0 by your own IP. Notice this IP needs to be accessible from the telegraf plugin. You can use the option '-Dcom.sun.management.jmxremote.authenticate=false' if you don't want to authenticate. Use at your own risk.
数据节点
要配置 DataNode 以公开 Jolokia API,您可以在 <HADOOP_HOME>/etc/hadoop/hadoop-env.sh 中设置以下内容:
export HADOOP_DATANODE_OPTS="$HADOOP_DATANODE_OPTS -javaagent:/opt/hadoop/lib/jolokia-jvm-1.6.0-agent.jar=port=7801,host=0.0.0.0 -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=8001 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.password.file=$HADOOP_HOME/conf/jmxremote.password" You can choose a different port for JMX (8001 above) and Jolokia (7801). If you have an internal IP to lock Jolokia onto you can replace the "catch all" 0.0.0.0 by your own IP. Notice this IP needs to be accessible from the telegraf plugin. You can use the option '-Dcom.sun.management.jmxremote.authenticate=false' if you don't want to authenticate. Use at your own risk.
资源管理器
要配置 ResourceManager 以公开 Jolokia API,您可以在 <HADOOP_HOME>/etc/hadoop/hadoop-env.sh 中设置以下内容:
export YARN_RESOURCEMANAGER_OPTS="$YARN_RESOURCEMANAGER_OPTS -javaagent:/opt/hadoop/lib/jolokia-jvm-1.6.0-agent.jar=port=7803,host=0.0.0.0 -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=8003 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.password.file=$HADOOP_HOME/conf/jmxremote.password" You can choose a different port for JMX (8003 above) and Jolokia (7803). If you have an internal IP to lock Jolokia onto you can replace the "catch all" 0.0.0.0 by your own IP. Notice this IP needs to be accessible from the telegraf plugin. You can use the option '-Dcom.sun.management.jmxremote.authenticate=false' if you don't want to authenticate. Use at your own risk.
节点管理器
要配置 NodeManagers 以公开 Jolokia API,您可以在 <HADOOP_HOME>/etc/hadoop/hadoop-env.sh 中设置以下内容:
export YARN_NODEMANAGER_OPTS="$YARN_NODEMANAGER_OPTS -javaagent:/opt/hadoop/lib/jolokia-jvm-1.6.0-agent.jar=port=7804,host=0.0.0.0 -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=8004 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.password.file=$HADOOP_HOME/conf/jmxremote.password" You can choose a different port for JMX (8004 above) and Jolokia (7804). If you have an internal IP to lock Jolokia onto you can replace the "catch all" 0.0.0.0 by your own IP. Notice this IP needs to be accessible from the telegraf plugin. You can use the option '-Dcom.sun.management.jmxremote.authenticate=false' if you don't want to authenticate. Use at your own risk.
作业历史服务器
要配置 JobHistoryServer 以公开 Jolokia API,您可以在 <HADOOP_HOME>/etc/hadoop/hadoop-env.sh 中设置以下内容:
export HADOOP_JOB_HISTORYSERVER_OPTS="$HADOOP_JOB_HISTORYSERVER_OPTS -javaagent:/opt/hadoop/lib/jolokia-jvm-1.6.0-agent.jar=port=7805,host=0.0.0.0 -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=8005 -Dcom.sun.management.jmxremote.password.file=$HADOOP_HOME/conf/jmxremote.password" You can choose a different port for JMX (8005 above) and Jolokia (7805). If you have an internal IP to lock Jolokia onto you can replace the "catch all" 0.0.0.0 by your own IP. Notice this IP needs to be accessible from the telegraf plugin. You can use the option '-Dcom.sun.management.jmxremote.authenticate=false' if you don't want to authenticate. Use at your own risk.
物体和计数器
收集以下对象及其计数器:
| 目的: | 标识符: | 属性: | 
|---|---|---|
| Hadoop 辅助 NameNode | 集群命名空间服务器 | 节点名称 节点IP 编译信息 版本 | 
| Hadoop 节点管理器 | 集群命名空间服务器 | 节点名称 节点IP | 
| Hadoop资源管理器 | 集群命名空间服务器 | 节点名称 节点IP | 
| Hadoop 数据节点 | 集群命名空间服务器 | 节点名称 节点 IP 集群 ID 版本 | 
| Hadoop 名称节点 | 集群命名空间服务器 | 节点名称节点 IP 事务 ID 上次写入时间自上次加载编辑 HA 状态文件系统状态块池 ID 集群 ID 编译信息不同版本计数版本 | 
| Hadoop 作业历史服务器 | 集群命名空间服务器 | 节点名称 节点IP | 
故障排除
更多信息可从"支持"页。
 PDF
PDF