在apache hive 0.14
中,我们可以通过支持ACID
配置来更新和删除查询:
hive.configuration:
hive.support.concurrency – true
hive.enforce.bucketing – true
hive.exec.dynamic.partition.mode – nonstrict
hive.txn.manager – org.apache.hadoop.hive.ql.lockmgr.DbTxnManager
hive.compactor.initiator.on – true (for exactly one instance of the Thrift metastore service)
hive.compactor.worker.threads-1
但是当我使用hiveQL show databases
时出现以下错误:
as@ubuntu:~$ hive
Logging initialized using configuration in jar:file:/home/as/hive/lib/hive-common-0.14.0.jar!/hive-log4j.properties<br>
SLF4J: Class path contains multiple SLF4J bindings.<br>
SLF4J: Found binding in [jar:file:/home/as/hadoop/share/hadoop/common/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]<br>
SLF4J: Found binding in [jar:file:/home/as/hive/lib/hive-jdbc-0.14.0-standalone.jar!/org/slf4j/impl/StaticLoggerBinder.class]<br>
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.<br>
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]<br>
hive> show databases;<br>
FAILED: LockException [Error 10280]: Error communicating with the metastore<br>
hive> exit;
<br>
请帮我修复错误。
答案 0 :(得分:3)
将其添加到hive-site.xml:
<property>
<name>hive.in.test</name>
<value>true</value>
</property>
&#13;
答案 1 :(得分:0)
很可能您的数据库服务器或您的hive Metastore未运行。试试这个。
mysqld # or pg_ctl start -l logfile or whatever your db start command
然后确保Metastore正在运行
nohup hive --service metastore &
OP中的UPDATE “没有足够的自由空间”
看看
/var/lib/mysql
并查看是否100%使用。参考:https://askubuntu.com/questions/198639/cannot-reinstall-mysql-in-11-10-error-theres-not-enough-space-in-var-lib-my
答案 2 :(得分:0)
线程所有者是正确的。设置 hive.txn.manager = org.apache.hadoop.hive.ql.lockmgr.DbTxnManager
导致连接错误到Metastore(在我的情况下,metasdtore是SAP ASE并且有多个数据库)
退回并将hive.txn.manager设置为默认值 hive.txn.manager = org.apache.hadoop.hive.ql.lockmgr.DummyTxnManager
再次回收了Metastore和hive服务器,一切正常!
听起来并发不起作用或者需要做些额外的工作!