Monday, May 25, 2015

Problem:
On a hive-server2 (hive .13), you may see a notification as mentioned below, but the query will still return the response.
Snippet:
hive> show tables;
FAILED: Error in semantic analysis: Lock manager could not be initialized, check hive.lock.manager Check hive.zookeeper.quorum and hive.zookeeper.client.port
OK
foo
employee

Solution:
Once you have enabled Hive's table lock manager service to support concurrency with hive-server2 by setting the value of hive.support.concurrency = true, you can see this error. [hive.lock.manager here refers to hive.support.concurrency]
In order to isolate the cause, you must verify if the below parameter is set in hive-site.xml
1. hive.zookeeper.quorum
2. hive.zookeeper.client.port (If not present, by default its 2181) 
Often if all the configuration are correct, you will still see the error if there are spaces in the list of hive.zookeeper.quorum, so ensure that there are no spaces.
It must be like below.
<property>
 <name>hive.zookeeper.quorum</name>
 <description>Zookeeper quorum used by Hive's Table Lock Manager</description>
 <value>host1.com,host2.com,host3.com/value>
</property>

No comments:

Post a Comment