hive shell没有在cloudera

时间:2017-11-14 22:51:52

标签: hadoop hive cloudera-cdh

我尝试重新启动系统,检查是否有足够的空间,并确保我的hive server2正在运行。但是当我在Cloudera中给出'$ hive'时,我会收到这些错误。

Logging initialized using configuration in 
file:/etc/hive/conf.dist/hive-log4j.properties
WARN: The method class 
org.apache.commons.logging.impl.SLF4JLogFactory#release() was invoked.

Exception in thread "main" java.lang.RuntimeException: 
org.apache.hadoop.hive.ql.metadata.HiveException: 
java.lang.RuntimeException: 
org.apache.hadoop.hive.ql.metadata.HiveException: 
java.lang.RuntimeException: Unable to instantiate 
org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient

1 个答案:

答案 0 :(得分:0)

启动Hive2的过程已更改,因为Hive已弃用。建议使用直线。

Beeline专门开发用于与新服务器交互。与基于Apache Thrift的客户端Hive CLI不同,Beeline是基于SQLLine CLI的JDBC客户端 - 尽管使用的JDBC驱动程序使用HiveServer2的Thrift API与HiveServer2进行通信。

随着Hive开发从最初的Hive服务器(HiveServer1)转移到新服务器(HiveServer2),用户和开发人员因此需要切换到新的客户端工具。但是,除了简单地将可执行文件名从“hive”切换为“beeline”之外,这个过程还有更多。

More information provided over here

使用以下命令进入交互模式。 Beeline支持Hive服务器所执行的相同命令。您可以在Beeline中执行相同的脚本而无需任何修改。

beeline -u jdbc:hive2://

启动Hive Metastore,

sudo service hive-metastore start