Adding/Defining Jars in Hive permanently

断了今生、忘了曾经 提交于 2019-12-10 14:57:14

问题


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


回答1:


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




回答2:


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



来源:https://stackoverflow.com/questions/24444542/adding-defining-jars-in-hive-permanently

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!