Enabling the JVM sensor on HDP cluster-wide for MapReduce2 (MR)
Note
unravel-host
must be a fully qualified DNS or an IP address.
Warning
Upon completion you must restart of all affected HDFS, MAPREDUCE2, YARN and HIVE services in Ambari UI.
In AWU, on the left-hand side, click MapReduce2 | Configs | Advanced tab, and select Advanced mapred-site.
Search for MR AppMaster Java Heap Size property and concatenate by copying and pasting the below property for current.yarn.app.mapreduce.am.command-opts MR JVM sensor. Be sure to leave a white space in-between the current and the following new property.
-javaagent:/usr/local/unravel-agent/jars/btrace-agent.jar=libs=mr -Dunravel.server.hostport=
unravel-host
:4043On the top notification banner, click Save.
In AWU, on the left-hand side, click MapReduce2, next click Configs, go to the Advanced tab, and select/click Custom mapred-site.
Inside Custom mapred-site, click Add Property for MR JVM sensor as follows and use the bulk property add mode.
On the top notification banner, click Save.
Tip
You can manually edit
/etc/hadoop/conf/mapred-site.xml
without using AWU.-javaagent:/usr/local/unravel-agent/jars/btrace-agent.jar=libs=mr -Dunravel.server.hostport=
unravel-host
:4043Propagate the Unravel resource metrics sensor JAR onto all the servers in the cluster.
Note
If you have already run the
unravel_hdp_setup.sh
script to distribute sensor; you can skip the following steps.Open a
ssh
session to the Unravel gateway host server and use guided steps to unzip the Unravel MR JARs.With root or
sudo
access, change directory to/usr/local/unravel-agent
and run the command:s belowcd /usr/local/unravel-agent curl http://localhost:3000/hh/unravel-agent-pack-bin.zip -o unravel-agent-pack-bin.zip unzip -d jars unravel-agent-pack-bin.zip
Note
Ensure you have already installed
unzip
,curl
, and opened Unravel port 3000.Create a
.tar
file of the/usr/local/unravel-agent
directory, and propagate to all the servers in the HDP cluster.cd /usr/local/ tar -cvf unravel-agent.tar ./unravel-agent
Copy the
unravel-agent.tar
file to all your servers, anduntar
to/usr/local
directory because when youuntar
unravel-agent
directory will appear.
Restart of all affected HDFS, MAPREDUCE2, YARN and HIVE services in Ambari UI.