How to make Ambari the hive Service in Output Java Dump file
1, select "Hive"
2, click on the "Configs" tab
3, scroll the screen, select "Advanced Hive-env", in the Hive-env template field note the original "Export hadoop_client_opts="-xmx${hadoop_heapsize}m $HADOOP _ Client_opts "
Modify the following:
#export hadoop_client_opts= "-xmx${hadoop_heapsize}m $HADOOP _client_opts"
Export hadoop_client_opts= "-xmx${hadoop_heapsize}m-verbose:gc-xx:+printgcdetails-xx:+printgcdatestamps-xloggc:/ var/log/hive/gc.hiveserver2.log-' date + '%y%m%d%h%m%s '-xx:+heapdumponoutofmemoryerror-xx:heapdumppath=/var/log/ Hive-xx:+disableexplicitgc-xx:+usecompressedoops $HADOOP _client_opts "
After the modification is complete, save the settings and restart Hive is required for the new configuration to take effect.
This way, on the host where the Hive server resides, the corresponding log file can be found in the/var/log/hive directory, and if OutOfMemory error occurs, the file name will be generated: Java_ PIDXXXXX.HPROF,XXXXX is the process ID for Java.
This file is larger and can be used to analyze \jdk1.7.0_79\bin\jvisualvm.exe using the analysis tool that comes with the JDK.
can also be used, IBM Heapanalyzer analysis: Https://www.ibm.com/developerworks/community/groups/service/html/communityview? communityuuid=4544bafe-c7a2-455f-9d43-eb866ea60091
How to make the hive service in Ambari output Java dump file