Linux 下 hiveserver2

一、安裝配置好hive: http://my.oschina.net/u/574036/blog/734642java

二、啓動hiveserver2服務node

(1)bin/hive --service hiveserver2apache

(2)鏈接測試session

bin/beelineoop

!connect jdbc:hive2://node01:10000/default測試

 

(3)至此hiveserver2 啓動ok。spa

如遇到如下問題:
Error: Failed to open new session: java.lang.RuntimeException: org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.security.authorize.AuthorizationException): User: hadoop is not allowed to impersonate hive (state=,code=0).net

解決辦法:修改配置文件core-site.xml文件,添加如下配置:
<property>
    <name>hadoop.native.lib</name>
    <value>false</value>
</property>
<property>
    <name>hadoop.proxyuser.hadoop.hosts</name>
    <value>*</value>
</property>
<property>
    <name>hadoop.proxyuser.hadoop.groups</name>
    <value>*</value>
</property>
code

相關文章
相關標籤/搜索