Raccoglitore dati Hadoop
Data Infrastructure Insights utilizza questo strumento di raccolta dati per raccogliere metriche da Hadoop.
Installazione
-
Da Osservabilità > Collettori, fare clic su +Collettore dati. Scegli Hadoop.
Selezionare il sistema operativo o la piattaforma su cui è installato l'agente Telegraf.
-
Se non hai ancora installato un agente per la raccolta o desideri installare un agente per un sistema operativo o una piattaforma diversi, fai clic su Mostra istruzioni per espandere la"Installazione dell'agente" istruzioni.
-
Selezionare la chiave di accesso dell'agente da utilizzare con questo raccoglitore dati. È possibile aggiungere una nuova chiave di accesso agente facendo clic sul pulsante + Chiave di accesso agente. Procedura consigliata: utilizzare una chiave di accesso agente diversa solo quando si desidera raggruppare i raccoglitori di dati, ad esempio in base al sistema operativo/piattaforma.
-
Seguire i passaggi di configurazione per configurare il raccoglitore dati. Le istruzioni variano a seconda del tipo di sistema operativo o piattaforma utilizzata per raccogliere i dati.

Impostare
Una distribuzione completa di Hadoop prevede i seguenti componenti:
-
NameNode: il sistema primario del file system distribuito Hadoop (HDFS). Coordina una serie di DataNode.
-
NameNode secondario: un failover a caldo per il NameNode principale. In Hadoop la promozione a NameNode non avviene automaticamente. Il NameNode secondario raccoglie informazioni dal NameNode per essere pronto a essere promosso quando necessario.
-
DataNode: Proprietario effettivo dei dati.
-
ResourceManager: il sistema di elaborazione primario (Yarn). Coordina una serie di NodeManager.
-
NodeManager: la risorsa per il calcolo. Posizione effettiva per l'esecuzione delle applicazioni.
-
JobHistoryServer: responsabile della gestione di tutte le richieste relative alla cronologia dei lavori.
Il plugin Hadoop è basato sul plugin Jolokia di Telegraf. Poiché è un requisito per raccogliere informazioni da tutti i componenti Hadoop, JMX deve essere configurato ed esposto tramite Jolokia su tutti i componenti.
Compatibilità
La configurazione è stata sviluppata per Hadoop versione 2.9.2.
Impostazione
Barattolo dell'agente Jolokia
Per tutti i singoli componenti è necessario scaricare una versione del file jar dell'agente Jolokia. La versione testata era"Agente Jolokia 1.6.0" .
Le istruzioni riportate di seguito presuppongono che il file jar scaricato (jolokia-jvm-1.6.0-agent.jar) sia posizionato nel percorso '/opt/hadoop/lib/'.
NomeNodo
Per configurare NameNode in modo che esponga l'API Jolokia, puoi impostare quanto segue in <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.
Nome secondarioNodo
Per configurare il Secondary NameNode in modo che esponga l'API Jolokia, puoi impostare quanto segue in <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.
Nodo dati
Per configurare i DataNode in modo che espongano l'API Jolokia, puoi impostare quanto segue in <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
Per configurare ResourceManager in modo che esponga l'API Jolokia, puoi impostare quanto segue in <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.
Gestore dei nodi
Per configurare i NodeManager in modo che espongano l'API Jolokia, puoi impostare quanto segue in <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
Per configurare JobHistoryServer in modo che esponga l'API Jolokia, è possibile impostare quanto segue in <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.
Oggetti e contatori
Vengono raccolti i seguenti oggetti e i relativi contatori:
| Oggetto: | Identificatori: | Attributi: |
|---|---|---|
Nome secondario HadoopNode |
Server dello spazio dei nomi del cluster |
Nome nodo IP nodo Informazioni di compilazione Versione |
Hadoop NodeManager |
Server dello spazio dei nomi del cluster |
Nome nodo IP nodo |
Hadoop Resource Manager |
Server dello spazio dei nomi del cluster |
Nome nodo IP nodo |
Hadoop DataNode |
Server dello spazio dei nomi del cluster |
Nome nodo IP nodo ID cluster Versione |
Nome nodo Hadoop |
Server dello spazio dei nomi del cluster |
Nome nodo IP nodo ID transazione Ultima scrittura Ora dall'ultimo caricamento Modifiche Stato HA Stato del file system ID del pool di blocchi ID del cluster Informazioni sulla compilazione Conteggio distinta delle versioni Versione |
Hadoop JobHistoryServer |
Server dello spazio dei nomi del cluster |
Nome nodo IP nodo |
Risoluzione dei problemi
Ulteriori informazioni possono essere trovate presso"Supporto" pagina.