jvm
jmap -F -dump:format=b,file=/tmp/driver.hprof 79206
jhat -J-Xmx1024M driver
-Dcom.sun.management.jmxremote.port=1099 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false
--conf "spark.executor.extraJavaOptions=-XX:+HeapDumpOnOutOfMemoryError -XX:+PrintGCDetails -XX:HeapDumpPath=/tmp/edp -XX:-UseGCOverheadLimit -Dlog4j.configuration=log4j.properties"
--conf "spark.driver.extraJavaOptions=-XX:+HeapDumpOnOutOfMemoryError -XX:+PrintGCDetails -XX:HeapDumpPath=/tmp/edp -XX:-UseGCOverheadLimit -Dlog4j.configuration=log4j.properties" \
在root权限下jmap -dump:format=b,file=/tmp/driver.hprof 79206 spark driver 总是提示
Unable to open socket file: target process not responding or HotSpot VM not loaded
The -F option can be used when the target process is not responding
这个时候发现pid 79206 不在/tmp/hsperfdata_root下。而是在/tmp/hsperfdata_yarn下,所以在yarn账号下执行就好了