Details
Description
ZooKeeperHiveLockManager does not use zookeeper in the proper way.
Currently a new zookeeper client instance is created for each getlock/releaselock query which sometimes causes the number of open connections between
HiveServer2 and ZooKeeper exceed the max connection number that zookeeper server allows.
To use zookeeper as a distributed lock, there is no need to create a new zookeeper instance for every getlock try. A single zookeeper instance could be reused and shared by ZooKeeperHiveLockManagers.