J.P Feng created HIVE-18303:
-------------------------------
Summary: ZooKeeperHiveLockManager should close after lock release
in releaseLocksAndCommitOrRollback
Key: HIVE-18303
URL: https://issues.apache.org/jira/browse/HIVE-18303
Project: Hive
Issue Type: Bug
Components: Hive
Affects Versions: 2.2.0, 2.1.1
Environment: hive2.1.1, jdk 1.7, centos
Reporter: J.P Feng
i found exception :
ZooKeeperHiveLockManager: Failed to release ZooKeeper lock:
java.lang.IllegalStateException: instance must be started before calling this
method
because in ShutdownHookManager, priority of
CuratorFrameworkSingleton.closeAndReleaseInstance is 10, but in
Driver.releaseLocksAndCommitOrRollback, it's 0. So locks are released after
CuratorFramework is closed, which may case such exception.
This is my operation:
I add hook of ExecuteWithHookContext or PreExecute, which simply sleep like:
@Override
public void run(HookContext hookContext) throws Exception {
int max_i = 6;
try {
for ( int i = 0; i < max_i ; i ++) {
LOG.info("try to sleep, for i is => " + i);
Thread.sleep(5000);
}
} catch (Exception e) {
LOG.error(e.getMessage(), e);
}
}
and run sql for example,
select count(1) from hive_test.time_test;
Then enter ctrl+c twice to kill hive client. Hive client will not exit, and the
above error is thrown.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)