Skip to main content
Data Infrastructure Insights
本繁體中文版使用機器翻譯,譯文僅供參考,若與英文版本牴觸,應以英文版本為準。

Hadoop資料收集器

貢獻者 netapp-alavoie

Data Infrastructure Insights使用此資料收集器從 Hadoop 收集指標。

安裝

  1. 從*可觀察性 > 收集器*中,按一下*+資料收集器*。選擇 Hadoop。

    選擇安裝 Telegraf 代理程式的作業系統或平台。

  2. 如果您尚未安裝用於收集的代理,或者您希望為不同的作業系統或平台安裝代理,請按一下「顯示說明」以展開"代理安裝"指示。

  3. 選擇用於此資料收集器的代理存取金鑰。您可以透過點擊 + 代理存取金鑰 按鈕新增新的代理存取金鑰。最佳實務:只有當您想要對資料收集器進行分組(例如按作業系統/平台)時才使用不同的代理存取金鑰。

  4. 依照設定步驟配置資料收集器。說明根據您用於收集資料的作業系統或平台的類型而有所不同。

Hadoop配置 Hadoop配置

設定

完整的 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

故障排除

更多資訊可從"支援"頁。