使用python连接hive
首先需要安装包:
pip install pyhive[hive]
如果安装报错的话执行:
sudo apt-get install libsasl2-dev
再安装下。
然后需要启动hive服务:
hive --service hiveserver2
修改hive验证方式: 在hive-site.xml中:
<property>
<name>hive.server2.authentication</name>
<value>NOSASL</value>
<description>
Expects one of [nosasl, none, ldap, kerberos, pam, custom].
Client authentication types.
NONE: no authentication check
LDAP: LDAP/AD based authentication
KERBEROS: Kerberos/GSSAPI authentication
CUSTOM: Custom authentication provider
(Use with property hive.server2.custom.authentica...