【问题标题】:Hive - Error in acquiring locksHive - 获取锁时出错
【发布时间】:2016-01-29 16:24:46
【问题描述】:

Hive 正在中止执行和日志记录:

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://

有人可以提供一些提示如何解决此问题吗?

hive 版本是 0.14 在 horton 发行版中 hive.support.concurrency=true; hive.txn.manager=DummyTxnManager

【问题讨论】:

  • 运行show locks ; 然后尝试了解谁或什么在锁定您的目标表。可能是来自 Windows 的崩溃 JDBC 客户端 - 由于某种原因,即使在客户端死亡 (Oracle 等的已知问题) 之后,JDBC-on-Windows 仍保持保持活动状态,您必须关闭用于释放连接和锁定的 Windows 会话。
  • 或者,Metastore DB 可能运行缓慢——查看 Metastore 服务日志。查看“超时”属性。默认值可能已更改为 0.13 或 0.14(我现在隐约记得……)

标签: transactions hive locking


【解决方案1】:

设置此属性并运行它。

SET hive.support.concurrency=false;

默认为真。

尼什

【讨论】:

    【解决方案2】:

    在某些情况下,查询可能会导致死锁。我建议仔细查看您的查询以确定任何死锁模式。

    locking documentation 可能会有所帮助。

    我不建议禁用并发,而是使用 configuration documentation 自定义

    hive.lock.numretries

    hive.unlock.numretries

    hive.lock.sleep.between.retries

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-09-23
      • 1970-01-01
      • 2021-02-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-26
      • 2023-03-03
      相关资源
      最近更新 更多