Mohammed Niaz
Mohammed Niaz

Reputation: 396

Adding/Defining Jars in Hive permanently

I was trying to add a jar in Hive classpath using below add command.

Command: hive> add myjar.jar

but whenever i login to hive, i need to add myjar.jar using add cmd. Is there any way I can add it permanently in Hive Classpath.

Regards, Mohammed Niaz

Upvotes: 5

Views: 10888

Answers (2)

Dhruv Kapatel
Dhruv Kapatel

Reputation: 893

In order to add them permanently recommended ways are as follows.

  1. add in hive-site.xml

    <property> <name>hive.aux.jars.path</name> <value>file://localpath/yourjar.jar</value> </property>

  2. Copy and paste the JAR file to the ${HIVE_HOME}/auxlib/ folder

    Source: Apache hive essentials book

Upvotes: 6

dpsdce
dpsdce

Reputation: 5450

add this to your .hiverc file

  add jar myjar.jar

have a look at this if you require further info

http://hadooped.blogspot.in/2013/08/hive-hiverc-file.html

Upvotes: 6

Related Questions