Title
Create new category
Edit page index title
Edit category
Edit link
Configure ODP Hive and Tez
This page describes how to enable Hive query statistics, configure JMX for HiveServer2 and Metastore, and place Pulse hook JARs for Hive and Tez so that Pulse can collect query data and metrics.
View Hive Table Details in Pulse
To display Hive table details with data in Pulse:
- Enable automatic statistics gathering. In the
hive-site.xmlfile, set the following properties totrue:
hive.stats.autogatherhive.stats.column.autogatherThis allows Hive to compute table statistics automatically.
- Compute statistics manually (optional). You can also run the following Hive command to compute table statistics manually:
ANALYZE TABLE <table_name> COMPUTE STATISTICS;Configure HiveServer2 JMX
In the Ambari UI:
- Navigate to Hive > Configs >
Advanced hive-env>hive-env template. - In
hive-envtemplate``, choose and add one of the following JMX configurations based on your security requirements.
Enable JMX without Security on JMX Remote Port
To enable JMX port without any security, add the following parameters at the end of the file:
if [ "$SERVICE" = "hiveserver2" ]; thenexport HADOOP_CLIENT_OPTS="$HADOOP_CLIENT_OPTS -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.port=8008"fiAvoid JMX Changes for Hive 1.x Using the MR Engine
Do not enable JMX for Hive 1.x when using the MapReduce (MR) execution engine. A known bug can cause query failures if JMX is enabled.
Enable Basic Authentication on JMX Remote Port (Optional)
To enable basic authentication on the JMX remote port, add the following parameters:
if [ "$SERVICE" = "hiveserver2" ]; thenexport HADOOP_CLIENT_OPTS="$HADOOP_CLIENT_OPTS -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=true -Dcom.sun.management.jmxremote.access.file=</path/to/jmxremote.access/file> -Dcom.sun.management.jmxremote.password.file=</path/to/jmxremote.password/file> -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.port=8008"fiEnable TLS/SSL on JMX Remote Port (Optional)
To enable TLS/SSL authentication on the JMX remote port, add the following parameters:
if [ "$SERVICE" = "hiveserver2" ]; thenexport HADOOP_CLIENT_OPTS="$HADOOP_CLIENT_OPTS -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=true -Dcom.sun.management.jmxremote.access.file=</path/to/jmxremote.access/file> -Dcom.sun.management.jmxremote.password.file=</path/to/jmxremote.password/file> -Dcom.sun.management.jmxremote.ssl=true -Dcom.sun.management.jmxremote.registry.ssl=true -Djavax.net.ssl.keyStore=</path/to/keystore.jks/file> -Djavax.net.ssl.keyStorePassword=<Keystore Password> -Djavax.net.ssl.trustStore=</path/to/truststore.jks/file> -Djavax.net.ssl.trustStorePassword=<Truststore Password> -Dcom.sun.management.jmxremote.port=8008"fiConfigure Hive Metastore JMX
In the Ambari UI:
- Navigate to Hive > Configs >
Advanced hive-env>hive-env template. - In
hive-env template, choose and add one of the following JMX configurations based on your security requirements.
Enable JMX without Security on JMX Remote Port
To enable JMX port without any security, add the following parameters at the end of the file:
if [ "$SERVICE" = "metastore" ]; thenexport HADOOP_CLIENT_OPTS="$HADOOP_CLIENT_OPTS -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.port=8009"fiEnable JMX With Basic Authentication (Optional)
To enable basic authentication on the JMX remote port, add the following parameters:
if [ "$SERVICE" = "metastore" ]; thenexport HADOOP_CLIENT_OPTS="$HADOOP_CLIENT_OPTS -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=true -Dcom.sun.management.jmxremote.access.file=</path/to/jmxremote.access/file> -Dcom.sun.management.jmxremote.password.file=</path/to/jmxremote.password/file> -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.port=8008"fiEnable JMX With TLS/SSL Authentication (Optional)
To enable TLS/SSL authentication on the JMX remote port, add the following parameters:
if [ "$SERVICE" = "metastore" ]; thenexport HADOOP_CLIENT_OPTS="$HADOOP_CLIENT_OPTS -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=true -Dcom.sun.management.jmxremote.access.file=</path/to/jmxremote.access/file> -Dcom.sun.management.jmxremote.password.file=</path/to/jmxremote.password/file> -Dcom.sun.management.jmxremote.ssl=true -Dcom.sun.management.jmxremote.registry.ssl=true -Djavax.net.ssl.keyStore=</path/to/keystore.jks/file> -Djavax.net.ssl.keyStorePassword=<Keystore Password> -Djavax.net.ssl.trustStore=</path/to/truststore.jks/file> -Djavax.net.ssl.trustStorePassword=<Truststore Password> -Dcom.sun.management.jmxremote.port=8008"fiPlace Pulse hook JARs and Set Properties (Hive and Tez)
Pulse uses Hive and Tez hooks to capture query statistics.
Hook JAR Mapping
| Distro Version | Tez Version | Hive Version | Pulse Hook Jar Name |
|---|---|---|---|
| ODP | 0.10.1 | 3.1.4 | ad-hive-hook_odp_3.1.4-assembly-X.Y.Z.jar |
| ODP | 0.10.1.3.2.3.5-3 | 3.1.4.3.2.3.5-3 | ad-hive-hook_odp_ 3.1.4.3.2.3.5-3-assembly-X.Y.Z.jar |
| ODP | 0.10.2.3.3.6.4-2 (JAVA 17) | 3.1.3.3.3.6.4-2 (JAVA 17) | ad-hive-hook_odp_3.1.3-assembly-X.Y.Z.jar |
| ODP | 0.10.3,0.10.3 | 4.0.0,4.0.1 | ad-hive-hook_odp_ 3.3.6_java11 |
X.Y.Z >> For details about supported hook versions on each Pulse version, see Supported Hook Versions.
- For Pulse 4.0.x, use the hook version 2.0.0.
- For Pulse 4.1.x, use the hook version 2.1.0
Steps to Place Hive Hook JARs
- Get the Hive hook JARs from Acceldata (see mapping above).
- Place the JARs on all edge nodes, HiveServer2, and Hive interactive nodes in:
/opt/acceldata- Ensure the hook directory is readable and executable by all users.
- Add the hook JARs to
AUX_CLASSPATH:
Update the hook JAR name in the following properties based on your installed ODP Tez and Hive versions.
- For HiveServer2, navigate to Hive > Configs >
Advanced hive-env, add the following hook jar.
For example:
export AUX_CLASSPATH=/opt/acceldata/ad-hive-hook_odp 3.1.4-assembly-x.y.x.jar- For Hive Interactive, navigate to Hive > Configs >
Advanced hive-interactive-env, add the following hook jar.
For example:
export AUX_CLASSPATH=/opt/acceldata/ad-hive-hook_odp 3.1.4-assembly-x.y.x.jarX.Y.Z >> For details about supported hook versions on each Pulse version, see Supported Hook Versions.
- For Pulse 4.0.x, use the hook version 2.0.0.
- For Pulse 4.1.x, use the hook version 2.1.0
Configuration
Set the following parameters and values for Hive and Tez:
In the Ambari UI, go to Services > Hive.
On the Hive page, click the Configs tab.
In Configs, select Custom-hive-site and set the following:
- ad.events.streaming.servers=(<Pulse IP>:19009)
- ad.cluster=(cluster name as specified in Pulse installation)
- (Optional: Add this only if the YARN Optimizer is enabled) Click Add Property to add a new property, and add ad.tez.fingerprinting:
true
Repeat the same configuration steps for Tez under Services > Tez > Configs > Custom-tez-site in the Ambari UI.
Save the configuration changes.
Restart the affected services to apply the new configuration.
Hive hook
In the Ambari UI:
- Navigate to Hive > Configs > Advanced > General.
- Ensure
io.acceldata.hive.AdHiveHookis added (comma-separated) under:
hive.exec.failure.hookshive.exec.pre.hookshive.exec.post.hooksTez hook
In the Ambari UI:
- Navigate to Tez > Configs > Advanced > General.
- Ensure the property
tez.history.logging.service.classis configured toio.acceldata.hive.AdTezEventsNatsClient.
Configure ODP Tez for Pulse
This section describes how to configure Tez so that Pulse can collect query events.
Prerequisites
- Obtain the Hive hook JARs from the Acceldata team.
- Review the mapping table to identify the correct JAR version for your HDP distribution. For details, see the section Hook JAR Mapping on this page.
Steps for Configuration
- Identify the hook JAR location.
For example:
- For Hive 3.1.4 on ODP:
Use the JAR ad-hive-hook_odp_3.1.4-assembly-X.Y.Z.jar on the HDFS path:
/odp/apps/${odp.version}/tez/tez.tar.gzFor details on the supported hooks for different Hive and Tez versions, see Place Pulse hook JARs and Set Properties (Hive and Tez)
X.Y.Z >> For details about supported hook versions on each Pulse version, see Supported Hook Versions.
- For Pulse 4.0.x, use the hook version 2.0.0.
- For Pulse 4.1.x, use the hook version 2.1.0
- Update the Tez tarball with the Pulse hook JAR.
# Create a directorymkdir -p tez_pack/ && cd tez_pack# Take backup of existing tez tarball in HDFS /tmphdfs dfs -cp /odp/apps/<cluster_version>/tez/tez.tar.gz /tmp# Download tez tarball from HDFS to local, switch to accesible userhdfs dfs -get /odp/apps/<cluster_version>/tez/tez.tar.gz .# Unpack the tarballtar -zxvf tez.tar.gz# Copy Pulse hook jar to tez libs/cp </location../../pulse_hook.jar> ./lib/# Package tez tarballtar -cvzf /tmp/tez.tar.gz .# Upload back and provide right permissions and ownershiphdfs dfs -put -f /tmp/tez.tar.gz /odp/apps/<cluster_version>/tez/tez.tar.gzhdfs dfs -chown hdfs:hadoop /odp/apps/<cluster_version>/tez/tez.tar.gzhdfs dfs -chmod 755 /odp/apps/<cluster_version>/tez/tez.tar.gz- Update the
tez-siteproperties.- In the Ambari UI, navigate to: Tez > Configs >
Custom tez-site. - Add or update the following properties:
- In the Ambari UI, navigate to: Tez > Configs >
tez.history.logging.service.class=io.acceldata.hive.AdTezEventsNatsClientad.events.streaming.servers (PULSE_IP:19009)ad.cluster (your cluster name, ex: ad_odp_dev)- Optional (Hive 3.x only): The property
ad.hdfs.sinkis set totrueby default. If set tofalse, Tez will not publish query metadata proto logs to HDFS.
Result
- View Hive table details in Pulse.
- HiveServer2 and Metastore expose JMX metrics.
- Pulse hooks (Hive/Tez) emit execution events to Pulse.
- Pulse hooks (Hive/Tez) send fingerprinting of applications to Pulse.
For additional help, contact www.acceldata.force.com OR call our service desk +1 844 9433282
Copyright © 2026