Support Questions

Find answers, ask questions, and share your expertise

Hive timed out on SELECT Operation (HDP-2.6.3.0)

avatar
Expert Contributor
---------------------------
ACID Transactions  - ON  
hive.support.concurrency=true
-------------------------------------

Table ODS_C1.CALL_HISTORYSS   -  not transaction 
In table ODS_C1.CALL_HISTORYSS  inserting data, but   not in partition hday='2017-01-28'



Executing command: select count(*) from ODS_C1.CALL_HISTORYSS  where  hday='2017-01-28';   <<<<<<<<<<<<<  problem select 

Error: Error while processing statement: FAILED: Error in acquiring locks: Lock acquisition for LockRequest(component:[LockComponent(type:SHARED_READ, level:TABLE, dbname:ods_c1, tablename:
call_historyss, operationType:SELECT)], txnid:0, user:hive, hostname:ks-dmp01.kyivstar.ua, agentInfo:hive_20180423093534_533cc06f-dd4d-4bea-987b-af0e9c5ed468) timed out after 5515859ms.  Lo
ckResponse(lockid:15373078, state:WAITING) (state=42000,code=10)
java.sql.SQLException: Error while processing statement: FAILED: Error in acquiring locks: Lock acquisition for LockRequest(component:[LockComponent(type:SHARED_READ, level:TABLE,
 dbname:ods_c1, tablename:call_historyss, operationType:SELECT)], txnid:0, user:hive, hostname:ks-dmp01.kyivstar.ua, agentInfo:hive_20180423093534_533cc06f-dd4d-4bea-987b-af0e9c5ed468)
 timed out after 5515859ms.  LockResponse(lockid:15373078, state:WAITING)
        at org.apache.hive.jdbc.HiveStatement.waitForOperationToComplete(HiveStatement.java:354)
        at org.apache.hive.jdbc.HiveStatement.execute(HiveStatement.java:245)
        at org.apache.hive.beeline.Commands.execute(Commands.java:859)
        at org.apache.hive.beeline.Commands.sql(Commands.java:729)
        at org.apache.hive.beeline.BeeLine.dispatch(BeeLine.java:1000)
        at org.apache.hive.beeline.BeeLine.initArgs(BeeLine.java:730)
        at org.apache.hive.beeline.BeeLine.begin(BeeLine.java:779)
        at org.apache.hive.beeline.BeeLine.mainWithInputRedirection(BeeLine.java:493)
        at org.apache.hive.beeline.BeeLine.main(BeeLine.java:476)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.hadoop.util.RunJar.run(RunJar.java:233)
        at org.apache.hadoop.util.RunJar.main(RunJar.java:148)


1 REPLY 1

avatar
Guru

@Dmitro Vasilenko

Either consider increasing the lock time out for the backend metastore DB, try using HiveServer2 (it uses embedded metastore). OR just try increasing "hive.lock.sleep.between.retries" to 120s and hive.lock.numretries to a higher value.