Copy Oracle NoSQL Database Libraries into Hive Auxiliary Directory
Some installations of Apache Hive provide a special directory to which third party libraries can be added so that direct modification of the HIVE_AUX_JARS_PATH
envrionment variable is not necessary. Such installations employ facilities that automatically update the value of the HIVE_AUX_JARS_PATH
with the JAR files located in that special directory.
For example, if your system is an Oracle Big Data Appliance (BDA) or an Oracle Big Data SQL system, then Hive, released by Cloudera, is installed as either packages or parcels (a binary distribution format that Cloudera provides as an alternative to rpm/deb
packages). Assuming your system's Hive installation is parcel based, then you would see a directory like the following:
/opt/cloudera/parcels/CDH/lib/hive/auxlib
For installations such as this, all JAR files located in the above directory will be
automatically added to the value of the HIVE_AUX_JARS_PATH
environment variable whenever the Hive CLI is launched.
Thus, one way to make the necessary Oracle NoSQL Database JAR files available to the Hive classpath is to copy the necessary libraries into the auxiliary library provided by your Hive installation. For example, if your Hive installation provides a hive/auxlib
directory like that shown above, you can do something like the following:
cd /opt/cloudera/parcels/CDH/lib/hive/auxlib
cp /opt/oracle/kv-ee/lib/kvclient.jar kvclient.jar
cp /opt/oracle/kv-ee/lib/kvstore-ee.jar kvstore-ee.jar
cp /opt/oracle/kv-ee/lib/jackson-core.jar jackson-core.jar
cp /opt/oracle/kv-ee/lib/jackson-databind.jar \
jackson-databind.jar
cp /opt/oracle/kv-ee/lib/jackson-annotations.jar \
jackson-annotations.jar
To integrate Oracle NoSQL Database with Hive, it is important to copy the libraries shipped with Oracle NoSQL Database rather than linking to those libraries in the system's hive/auxlib
directory. Copying the libraries shown above will prevent possible ClassLoader
conflict errors that can be caused by older versions of third party libraries included in the system's Hadoop and Hive distributions.