Monitoring individual Hive queries
The Unravel JVM sensor is a prepackaged distribution of JVM agent which enables the collection of additional information, including resource usage metrics. The sensor binary is distributed as unravel-agent-pack-bin.zip
.
Note
unravel-host
is your Unravel gateway server. Port 4043 is where Unravel LR server is running.
When you enable this sensor, it uses the standard MapReduce profiling extension. You can copy and paste the following configuration snippets for a quick bootstrap
Option A: Installing the MapReduce JVM sensor on CDH
Enable profiling:
set mapreduce.task.profile=true;
Select map and reduce profiles:
set mapreduce.task.profile.maps=0-5; set mapreduce.task.profile.reduces=0-5;
Enable the JVM agent for map and reduce tasks:
set mapreduce.task.profile.params=- javaagent:/opt/cloudera/parcels/UNRAVEL_SENSOR/lib/java/btrace-agent.jar=libs=mr -Dunravel.server.hostport=
unravel-host
:4043;Enable the JVM agent for application master:
set yarn.app.mapreduce.am.command-opts=- javaagent:/opt/cloudera/parcels/UNRAVEL_SENSOR/lib/java/btrace-agent.jar=libs=mr -Dunravel.server.hostport=
unravel-host
:4043;
Option B: Installing the MapReduce JVM sensor on Cloudera Manager for Hive
See Optional - Configure YARN - MapReduce (MR) JVM Sensor Cluster-Wide in Step 2: Install Unravel Sensor and Configure Impala.
Option C: Installing the MapReduce JVM sensor on HDFS
Change your *init
file as follows:
Set the path to the JVM sensor archive.
set mapreduce.job.cache.archives=path_in_hdfs/unravel-agent-pack-bin.zip;
Enable profiling:
set mapreduce.task.profile=true;
Select map and reduce profiles:
set mapreduce.task.profile.maps=0-5; set mapreduce.task.profile.reduces=0-5;
Enable the JVM agent for map and reduce tasks:
set mapreduce.task.profile.params=-javaagent:unravel-agent-pack-bin.zip/btrace-agent.jar=libs=mr -Dunravel.server.hostport=
unravel-host
:4043;Enable the JVM agent for application master:
set yarn.app.mapreduce.am.command-opts=-javaagent:unravel-agent-pack-bin.zip/btrace-agent.jar=libs=mr -Dunravel.server.hostport=
unravel-host
:4043;
Option D: Installing the MapReduce JVM sensor on the local file system
Add the JVM sensor archive to the PATH environment variable.
Enable profiling:
set mapreduce.task.profile=true; set mapreduce.task.profile=true; set mapreduce.task.profile=true;
Select map and reduce profiles:
set mapreduce.task.profile.maps=0-5; set mapreduce.task.profile.reduces=0-5; set mapreduce.task.profile.maps=0-5; set mapreduce.task.profile.reduces=0-5; set mapreduce.task.profile.maps=0-5; set mapreduce.task.profile.reduces=0-5; set mapreduce.task.profile.maps=0-5; set mapreduce.task.profile.reduces=0-5;
Enable the JVM agent for map and reduce tasks:
set mapreduce.task.profile.params=-javaagent:unravel-agent-pack-bin.zip/btrace-agent.jar=libs=mr -Dunravel.server.hostport=
unravel-host
:4043;Enable the JVM agent for application master:
set yarn.app.mapreduce.am.command-opts=-javaagent:unravel-agent-pack-bin.zip/btrace-agent.jar=libs=mr -Dunravel.server.hostport=
unravel-host
:4043;