When does hive need to ingest the package? How do I introduce it?
First, the Hive.aux.jars.path in Hive-site.xml
This configuration item is valid for Hive server, but does not affect the hive shell. That is, even if you configure this on the Hive node, it is not valid for the hive shell (why?). is not the server configuration, all hive shell can be effective? Do not understand). However, in the Hive-site.xml template file can not find the Hive.aux.jars.path configuration, is not hive is slowly changing the user discard configuration this property?
Note: 1, currently only support file://is the local file, is not supported HDFs, also does not support folders. 2, multiple files are separated with commas. 3, cannot be wrapped.
When you have similar Hbase-0.94.15-cdh4.7.0.jar packages, you can use the following configuration:
<property> <name>hive.aux.jars.path</name> <value>file:///home/cdh/apps/ Hive-0.10.0-cdh4.7.0/lib/hive-hbase-handler-0.10.0-cdh4.7.0.jar,file:///home/cdh/apps/hive-0.10.0-cdh4.7.0/lib /hbase-0.94.15-cdh4.7.0.jar,file:///home/cdh/apps/hive-0.10.0-cdh4.7.0/lib/zookeeper-3.4.5-cdh4.7.0.jar,file:/ Home/cdh/apps/hive-0.10.0-cdh4.7.0/lib/antlr-runtime-3.4.jar</value></property>
When there is no similar Hbase-0.94.15-cdh4.7.0.jar package, you can use the following configuration:
<property> <name>hive.aux.jars.path</name> <value>file:///home/hadoop/apps/ hive-0.12.0-cdh5.1.0/lib/hive-hbase-handler-0.12.0-cdh5.1.0.jar,file:///home/hadoop/apps/hive-0.12.0-cdh5.1.0/ lib/hbase-client-0.98.1-cdh5.1.0.jar,file:///home/hadoop/apps/hive-0.12.0-cdh5.1.0/lib/ hbase-common-0.98.1-cdh5.1.0.jar,file:///home/hadoop/apps/hive-0.12.0-cdh5.1.0/lib/ Zookeeper-3.4.5-cdh5.1.0.jar</value></property>
Second, the HIVE.AUX.JARS.PATH in hive-env.sh
The HIVE.AUX.JARS.PATH in hive-env.sh is not valid for the server, only valid for the current hive shell, different hive shells do not affect each other, each hive shell needs to be configured and can be configured as a folder.
Note: 1, depending on the hive startup script, this property should also support only file://, which is the local file, which does not support HDFS and does not validate. 2. This configuration can be configured as a file or as a folder, and it is recommended to configure it as a folder.
You can use the following configuration:
Export Hive_aux_jars_path= $HIVE _home/lib
Third, use the Add Jar
Using the Add jar should also be invalid for the server, only valid for the current hive shell (not verified), the Add Jar suggests an HDFs path, and the jar packets are uploaded to HDFs, which is convenient. If you specify a local path, you need to make sure that the required jar packages are placed on each hive Shell node at the corresponding location, which can be cumbersome to operate.
You can use the following command:
Add jar Hdfs://hadoop01:9000/user/hive/share/hiveudf.jar;delete jar hdfs://hadoop01:9000/user/hadoop/share/ Hiveudf.jar;
Reference: How to add a third-party jar package to hive and Oozie
HIVE introduces jar packages--hive.aux.jars.path and Hive.aux.jars.path