You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "J.P Feng (JIRA)" <ji...@apache.org> on 2017/12/19 09:49:00 UTC

[jira] [Updated] (HIVE-18303) ZooKeeperHiveLockManager should close after lock release in releaseLocksAndCommitOrRollback

     [ https://issues.apache.org/jira/browse/HIVE-18303?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

J.P Feng updated HIVE-18303:
----------------------------
    Environment: jdk 1.7, centos  (was: hive2.1.1, jdk 1.7, centos)

> 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.1.1, 2.2.0
>         Environment: 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)