Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hive - Error in acquiring locks

Hive is aborting execution and logging:

No rows affected (0.005 seconds)
No rows affected (0.059 seconds)
Error: Error while processing statement: FAILED: Error in acquiring locks: Locks on the underlying objects cannot be acquired. retry after some time (state=42000,code=10)

Closing: 0: jdbc:hive2://

Can someone give some tip how to troubleshoot this?

hive version is 0.14 in a horton distribution hive.support.concurrency=true; hive.txn.manager=DummyTxnManager

like image 573
Virgulino Avatar asked Jan 29 '16 16:01

Virgulino


2 Answers

Set this property and run it.

SET hive.support.concurrency=false;

By default it is true.

Nitish

like image 176
Nitish Khanna Avatar answered Nov 10 '22 22:11

Nitish Khanna


In some cases, queries can lead to dead lock. I suggest having a closer look at your query to identify any dead lock pattern.

The locking documentation might help.

I don't suggest disabling the concurrency but instead, using the configuration documentation customize

hive.lock.numretries

hive.unlock.numretries

hive.lock.sleep.between.retries

like image 2
OOP Avatar answered Nov 10 '22 23:11

OOP