hive 0.14 update and delete queries configuration

2019-07-30 22:48发布

In apache hive 0.14 we can update and delete queries by supporting ACID configuration:

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

But I get the following error when I use 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>

Please help me fix error.

标签: hadoop hive
3条回答
Luminary・发光体
2楼-- · 2019-07-30 23:18

The thread owner is correct. Setting hive.txn.manager=org.apache.hadoop.hive.ql.lockmgr.DbTxnManager

causes connection error to metastore (in my case metasdtore is SAP ASE and has multiple databases on it)

Went back and set hive.txn.manager to default hive.txn.manager= org.apache.hadoop.hive.ql.lockmgr.DummyTxnManager

and recycled both metastore and hive server again and all worked!

Sounds like concurrency does not work or something extra needs to be done!

查看更多
Summer. ? 凉城
3楼-- · 2019-07-30 23:41

let add it in hive-site.xml:

    <property>  
    <name>hive.in.test</name>  
    <value>true</value>  
</property>

查看更多
甜甜的少女心
4楼-- · 2019-07-30 23:41

Most likely either your db server or your hive metastore is not running. Try this.

mysqld    # or pg_ctl start -l logfile   or whatever your db start command

Then ensure the metastore is running

nohup hive --service metastore &

UPDATE from OP "not enough freespace"

Take a look at

/var/lib/mysql  

and see if it is 100% utilized. Reference: https://askubuntu.com/questions/198639/cannot-reinstall-mysql-in-11-10-error-theres-not-enough-space-in-var-lib-my

查看更多
登录 后发表回答