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:

  1. Enable automatic statistics gathering. In the hive-site.xml file, set the following properties to true:
Bash
Copy

This allows Hive to compute table statistics automatically.

  1. Compute statistics manually (optional). You can also run the following Hive command to compute table statistics manually:
Bash
Copy

Configure HiveServer2 JMX

In the Ambari UI:

  1. Navigate to Hive > Configs > Advanced hive-env > hive-env template.
  2. 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:

Bash
Copy

Avoid 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:

Bash
Copy

Enable TLS/SSL on JMX Remote Port (Optional)

To enable TLS/SSL authentication on the JMX remote port, add the following parameters:

Bash
Copy

Configure Hive Metastore JMX

In the Ambari UI:

  1. Navigate to Hive > Configs > Advanced hive-env > hive-env template.
  2. 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:

Bash
Copy

Enable JMX With Basic Authentication (Optional)

To enable basic authentication on the JMX remote port, add the following parameters:

Bash
Copy

Enable JMX With TLS/SSL Authentication (Optional)

To enable TLS/SSL authentication on the JMX remote port, add the following parameters:

Bash
Copy

Place Pulse hook JARs and Set Properties (Hive and Tez)

Pulse uses Hive and Tez hooks to capture query statistics.

Hook JAR Mapping

Distro VersionHive VersionTez VersionPulse Hook Jar Name
ODP3.1.40.10.1ad-hive-hook_odp 3.1.4-assembly-2.0.0.jar
ODP0.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-2.0.0.jar (only supported for Hive and Tez running on JAVA 17)
ODP0.10.3,0.10.34.0.0,4.0.1

ad-hive-hook_odp_ 3.3.6_java11

Note If you are using Pulse 3.8.x or later with ODP 3.3.6.x.x, ensure to use this hook.

Steps to Place Hive Hook JARs

  1. Get the Hive hook JARs from Acceldata (see mapping above).
  2. Place the JARs on all edge nodes, HiveServer2, and Hive interactive nodes in:
Bash
Copy
  1. Ensure the hook directory is readable and executable by all users.
  2. 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:

Bash
Copy
  • For Hive Interactive, navigate to Hive > Configs > Advanced hive-interactive-env, add the following hook jar.

For example:

Bash
Copy

Configuration

Set the following parameters and values for Hive and Tez:

  1. In the Ambari UI, go to Services > Hive.

  2. On the Hive page, click the Configs tab.

  3. In Configs, select Custom-hive-site and set the following:

    1. ad.events.streaming.servers=(<Pulse IP>:19009)
    2. ad.cluster=(cluster name as specified in Pulse installation)
    3. (Optional: Add this only if the YARN Optimizer is enabled) Click Add Property to add a new property, and add ad.tez.fingerprinting: true
  4. Repeat the same configuration steps for Tez under Services > Tez > Configs > Custom-tez-site in the Ambari UI.

  5. Save the configuration changes.

  6. Restart the affected services to apply the new configuration.

Hive hook

In the Ambari UI:

  1. Navigate to Hive > Configs > Advanced > General.
  2. Ensure io.acceldata.hive.AdHiveHook is added (comma-separated) under:
Bash
Copy

Tez hook

In the Ambari UI:

  1. Navigate to Tez > Configs > Advanced > General.
  2. Ensure the property tez.history.logging.service.class is configured to io.acceldata.hive.AdTezEventsNatsClient.

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.
Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard