I'm having a problem with profiling JVM for hadoop using Java agent as in https://github.com/etsy/statsd-jvm-profiler
The agent gets stack traces using management API at runtime. The -javaagent argument is specified in the mapred-site.xml file as follows:
<configuration>
<property>
<name>mapreduce.map.java.opts</name>
<value>-Xmx1536m -javaagent:myagent</value>
</property>
<property>
<name>mapreduce.reduce.java.opts</name>
<value>-Xmx3072m -javaagent:myagent</value>
</property>
</configuration>
However, my agent cannot get any stack trace for the map or reduce tasks I defined when running my MapReduce application.