[英]What is the proper location for hive-jdbc-__-standalone.jar?
This guide on setting up hive 0.14: http://www.ishaanguliani.com/content/hive-0140-setup-ubuntu 此设置蜂巢0.14的指南: http : //www.ishaanguliani.com/content/hive-0140-setup-ubuntu
suggests that if an error: 建议如果出现错误:
Logging initialized using configuration in jar:file:/usr/local/hive/lib/hive-common-0.14.0.jar!/hive-log4j.properties
SLF4J: Class path contains multiple SLF4J bindings.
is encountered the file hive-jdbc-0.14.0-standalone.jar has to be moved out from $HIVE_HOME/lib/ 遇到文件hive-jdbc-0.14.0-standalone.jar必须从$ HIVE_HOME / lib /中移出
but when I run beeline, it errors because the file is not there: 但是当我运行beeline时,它会出错,因为文件不存在:
$ $HIVE_HOME/bin/beeline -u jdbc:hive2://localhost:10000
ls: cannot access /usr/local/hive/lib/hive-jdbc-*-standalone.jar: No such file or directory
What is the right thing to do? 正确的做法是什么?
You can do any of the below do any of the following 您可以执行以下任何一项操作
RCA : In hive2.1 the hive-jdbc-*-standalone.jar file does not exist in ${HIVE_LIB} but the {$HIVE_HOME}/jdbc directory. RCA :在hive2.1中,hive-jdbc-*-standalone.jar文件在$ {HIVE_LIB}中不存在,但在{$ HIVE_HOME} / jdbc目录中不存在。
** System Specification ** hive-2.1 binary java1.8 CentOS Linux release 7.1.1503 (Core) **系统规范** Hive-2.1二进制java1.8 CentOS Linux版本7.1.1503(Core)
Possible Solutions : 可能的解决方案 :
Copy the jar file to the directory expected by the script. 将jar文件复制到脚本期望的目录中。 Easy but I don't like keeping multiple files 容易,但我不喜欢保留多个文件
bash# cp ${HIVE_HOME}/jdbc/hive-jdbc-2.1.0-standalone.jar ${HIVE_HOME}/lib/hive-jdbc-2.1.0-standalone.jar
or 要么
Create a link to the jar file in to point to the directory expected by the script 创建指向jar文件的链接,以指向脚本期望的目录
(My preferred method). (我的首选方法)。 bash# ln -s ${HIVE_HOME}/jdbc/hive-jdbc-2.1.0-standalone.jar ${HIVE_HOME}/lib/hive-jdbc-2.1.0-standalone.jar
Edit the file ${HIVE_HOME}/bin/ext/beeline.sh 编辑文件$ {HIVE_HOME} /bin/ext/beeline.sh
bash# vi +27 ${HIVE_HOME}/bin/ext/beeline.sh
Edit the line 编辑线
jdbcStandaloneJarPath=`ls ${HIVE_LIB}/hive-jdbc-*-standalone.jar`
to
jdbcStandaloneJarPath=`ls ${HIVE_HOME}/jdbc/hive-jdbc-*-standalone.jar`
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.