首先正确的配置Hive的表锁管理,这需要通过ZooKeeper集群来实现。如果不进行如下配置,HiveServer2无法提供并发的查询操作。

在hive的配置文件(这里是/etc/hive/conf/hive-site.xml)中进行如下配置:

<!– ZooKeeper集群相关配置 –>
<property>
<name>hive.zookeeper.quorum</name>
<description>Zookeeper quorum used by Hive’s Table Lock Manager</description>
<value>H22,H34,H35</value>
</property>
<property>
<name>hive.zookeeper.client.port</name>
<value>2181</value>
<description>The port at which the clients will connect.</description>
</property>
<property>
<name>hive.zookeeper.namespace</name>
<value>hive_zookeeper_namespace</value>
<description>Znode for hive, default value is hive_zookeeper_namespace</description>
</property>

<!– hive支持并发 –>
<property>
<name>hive.support.concurrency</name>
<value>true</value>
<description>Enable Hive’s Table Lock Manager Service</description>
</property>

posted on 2015-03-19 15:01  LIUSANNITY  阅读(1739)  评论(0编辑  收藏  举报