简体   繁体   English

hive-jdbc -__- standalone.jar的正确位置是什么?

[英]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 : 可能的解决方案

  1. 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 要么

  1. 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

  2. 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.

相关问题 在库文件中使用hive-jdbc-2.0.0-standalone.jar时,jsp文件失败 - Jsp file fail when using hive-jdbc-2.0.0-standalone.jar in library file apache 的替代方案 hive-jdbc jar - Alternative for apache hive-jdbc jar Apache hive-jdbc jar 和 Cloudera hive-jdbc jar 的区别 - Difference between Apache hive-jdbc jar and Cloudera hive-jdbc jar hive jdbc 客户端和 hive Metastore java api 有什么区别? - What is the difference between the hive jdbc client and the hive metastore java api? Maven-JDBC jar文件的正确范围是什么? - Maven - what the correct scope for JDBC jar files? 独立Java EE JAR文件的直接链接是什么? - What is the direct link for the standalone Java EE JAR file? 除了 JDBC 之外,使用 Java 连接到 Hive 有哪些不同的方法? - What are different methods to connect to Hive with Java other than JDBC? Maven可部署jar“ java.lang.ClassNotFoundException:org.apache.hadoop.hive.jdbc.HiveDriver”错误 - maven deployable jar “java.lang.ClassNotFoundException: org.apache.hadoop.hive.jdbc.HiveDriver” error 使用Spring和DBCP处理JDBC连接的正确方法是什么? - What's the proper way to handle JDBC connections with Spring and DBCP? Netbeans:如何将独立Java应用程序的JAR文件自动传输到远程位置 - Netbeans: how to auto transfer standalone Java app's JAR file to remote location
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM