现象 :Azkaban停留在
Logging initialized using configuration in jar:file:/application/cloudera/parcels/CDH-5.16.2-1.cdh5.16.2.p0.8/jars/hive-common-1.1.0-cdh5.16.2.jar!/hive-log4j.properties
一直不动
16-03-2022 05:00:12 CST tb_product_order_large_minutes INFO - Logging initialized using configuration in jar:file:/application/cloudera/parcels/CDH-5.16.2-1.cdh5.16.2.p0.8/jars/hive-common-1.1.0-cdh5.16.2.jar!/hive-log4j.properties
16-03-2022 06:39:20 CST tb_product_order_large_minutes INFO - Unable to acquire IMPLICIT, EXCLUSIVE lock ods@tb_product_order_large_minutes after 100 attempts.
16-03-2022 06:39:20 CST tb_product_order_large_minutes INFO - FAILED: Error in acquiring locks: Locks on the underlying objects cannot be acquired. retry after some time
从05:00:00 一直不动,到 06:39:20 才报错.这中间经历了大约100分钟。
从报错提示找信息,
1.里面说重试了100次. 那就是1分钟重复一次.
关于重拾次数和重试sleep时间在下面设置.可以把次数和时间设置少一点.
hive.lock.numretries #重试次数
hive.lock.sleep.between.retries #重试时sleep的时间 单位秒
2. 报错说表被锁了.那就查询表锁的状态。
查询表是否被锁:
show locks ods.tb_user_info_minutes;
查询结果:
ods@tb_user_info_minutes SHARED
如果表没有被锁,那查询结果为空.如果不为空,那就是被锁表了.
解锁表:
unlock table ods.tb_user_info_minutes;
3. 以防以后表还会被锁,在sql代码中增加如下内容关闭锁(只在当前任务有效)
-- close the lock
set hive.support.concurrency=false;
?
|