Skip to main content

Home

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.

  1. In AWU, on the left-hand side, click MapReduce2 | Configs | Advanced tab, and select Advanced mapred-site.

  2. 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:4043 
  3. On the top notification banner, click Save.

  4. In AWU, on the left-hand side, click MapReduce2, next click Configs, go to the Advanced tab, and select/click Custom mapred-site.

  5. Inside Custom mapred-site, click Add Property for MR JVM sensor as follows and use the bulk property add mode.

  6. 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:4043 
  7. Propagate 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.

  8. 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 below

      cd /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, and untar to /usr/local directory because when you untarunravel-agent directory will appear.

  9. Restart of all affected HDFS, MAPREDUCE2, YARN and HIVE services in Ambari UI.