This is the documentation for Cloudera Manager 5.1.x. Documentation for other versions is available at Cloudera Documentation.

Using User-Defined Functions (UDFs) with HiveServer2

Required Role:

  Important: HiveQL's ADD JAR operation does not work with HiveServer2 and the Beeline client when Beeline runs on a different host. As an alterntive to ADD JAR, Hive auxiliary path functionality should be used as described below.
To use custom user-defined functions (UDFs) with Hive, do the following:
  1. Copy the UDF JAR files to the host on which HiveServer2 is running. Save the JARs to any directory you choose, and make a note of the path.
  2. In the Cloudera Manager Admin Console, go to the Hive service.
  3. Click the Configuration tab.
  4. Expand the Service-Wide > Advanced categories
  5. Configure the Hive Auxiliary Jars Directory property with the path from the first step.
  6. Click Save Changes. The JARs are added to HIVE_AUX_JARS_PATH environment variable.
  7. Redeploy the Hive client configuration.
    1. In the Cloudera Manager Admin Console, go to the Hive service.
    2. From the Actions menu at the top right of the service page, select Deploy Client Configuration.
    3. Click Deploy Client Configuration.
  8. Restart the Hive service. If the Hive Auxiliary Jars Directory property is configured but the directory does not exist, HiveServer2 will not start.
Page generated September 3, 2015.