2

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.

Steve Vinoski
  • 19,847
  • 3
  • 31
  • 46
voxter
  • 853
  • 2
  • 14
  • 30

3 Answers3

5

let add it in hive-site.xml:

    <property>  
    <name>hive.in.test</name>  
    <value>true</value>  
</property>
voxter
  • 853
  • 2
  • 14
  • 30
1

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

Community
  • 1
  • 1
WestCoastProjects
  • 58,982
  • 91
  • 316
  • 560
  • i think we have a problem with this configuration: hive.txn.manager – org.apache.hadoop.hive.ql.lockmgr.DbTxnManager if i delete this line i can start and use hive. so i don`t think hive metastore is not our problem you can show more hint for me? – voxter Dec 15 '14 at 13:34
  • i used command: mysqld
    ; hive --service metastore & ->>>> and i get error:not enough free space(i have 5.7 GB free) any other help?please
    – voxter Dec 16 '14 at 05:23
  • Updated answer. I have helped a bit here, no? Maybe you might consider to upvote - even if not accept yet? – WestCoastProjects Dec 16 '14 at 05:30
  • My system is not enough-this is a system notification-not mysql notification.When i used command :hive --service metastore & >>> a warning system notification that not enough space,i am not understand that command creat a metadata which need 5.7GB on my computer – voxter Dec 16 '14 at 08:04
  • Please separate the mysqld command and the hive --service command on two separate lines. We need to be sure which one of the commands is causing the issue. The error is NOT about trying to use 5.7GB for metadata . It may be due to a particular mount point (NOT / ..) having too little space. – WestCoastProjects Dec 16 '14 at 08:07
  • metadata_db of hive is in my home folder /home/$USER.I not stored hive metadata in mysql so the problem is not in mysqld.when i used command and saw the system monitor the directory / is used 100% – voxter Dec 16 '14 at 12:18
1

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!

  • 2
    But we need DbTxnManager to use ACID support for hive right??(the hive ACID guide says that we need it) – voxter Apr 07 '15 at 12:41