蜂房-site.xml中
<property>
<name>javax.jdo.option.ConnectionURL</name>
<value>jdbc:derby://localhost:1527/metastore_db;create=true</value>
<description>JDBC connect string for a JDBC metastore</description>
</property>
<property>
<name>javax.jdo.option.ConnectionDriverName</name>
<value>org.apache.derby.jdbc.ClientDriver</value>
<description>Driver class name for a JDBC metastore</description>
</property>
<property>
<name>hive.metastore.warehouse.dir</name>
<value>/user/hive/warehouse</value>
<description>location of default database for the warehouse</description>
</property>
[user1 @ slave3~] $ hive
which: no hbase in (/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/home/user1/hadoop-2.9.0/bin:/usr/local/jdk1.8.0_161/bin:/home/user1/hadoop-2.9.0/sbin:/home/user1/sqoop-1.4.7.bin__hadoop-2.6.0/bin:/home/user1/apache-hive-2.3.2-bin/bin:/usr/local/derby/bin:/home/user1/.local/bin:/home/user1/bin:usr/local/jdk1.8.0_161/bin:/home/user1/hadoop-2.9.0/bin:/usr/local/jdk1.8.0_161/bin:/home/user1/hadoop-2.9.0/sbin:/home/user1/sqoop-1.4.7.bin__hadoop-2.6.0/bin:/home/user1/apache-hive-2.3.2-bin/bin:/usr/local/derby/bin)
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/home/user1/apache-hive-2.3.2-bin/lib/log4j-slf4j-impl-2.6.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/home/user1/hadoop-2.9.0/share/hadoop/common/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory]
Logging initialized using configuration in jar:file:/home/user1/apache-hive-2.3.2-bin/lib/hive-common-2.3.2.jar!/hive-log4j2.properties Async: true
Hive-on-MR is deprecated in Hive 2 and may not be available in the future versions. Consider using a different execution engine (i.e. spark, tez) or using Hive 1.X releases.
蜂房&GT;显示数据库;
FAILED: SemanticException org.apache.hadoop.hive.ql.metadata.HiveException: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient
我试图安装配置单元,但它提供了SemanticException。有人可以帮忙吗?
答案 0 :(得分:0)
您是否已启动元存储库?您的metastore必须已启动并正在运行,然后才能在配置单元上运行查询。
运行以下命令来创建元数据库
schematool -dbType derby -initSchema
然后启动Metastore
hive --service metastore&
答案 1 :(得分:0)
我遇到了同样的错误,这仅仅是因为有两个SLF4j正在运行,但是java仅使用了一个强制性依赖项,因此您只需要删除该文件。 我从蜂巢中删除了它,它才起作用。
您要做的就是删除此文件
log4j-slf4j-impl-2.6.2.jar!
来自
/home/user1/apache-hive-2.3.2-bin/lib /
你很好。