Community Articles

Find and share helpful community-sourced technical articles.
Labels (1)

HiveServer2 does not expose jmx or equivalent metrics but often we require to monitor the Hiveserver2 process to know cpu usage, heap usage and state of various thread along with some other params like no of class loaded by hs2 jvm. it is also very useful if you want to run some cpu/memory sampling to profile hiveserver2.

Step 1: login into Ambari and open hive advanced configuration

Step 2: expand advanced hive-env settings and add the following configuration in hive-env template

if [ "$SERVICE" = "hiveserver2" ]; then

Step 3: Restart HiveServer2

Step 4: on client machine open jvisualvm($JAVA_HOME/bin), once open go to File -> Add JMX Connection -> enter hostname and port no(it's 8008 in this case) and you are good to go.


Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.
Version history
Last update:
‎08-17-2019 08:45 AM
Updated by:
Top Kudoed Authors