[英]Unable to connect hive jdbc through beeline
我是 hive 的新手并想建立连接,我现在可以使用 Hive CLI 这样做我想通过直线连接 hive 但我在连接时遇到错误。
尝试将 hive 与 transportMode 作为 http 连接,但这也不起作用。
jdbc:hive2://localhost:10001/default;transportMode=http
请参考我的hive-site.xml
文件。
<property>
<name>hive.server2.transport.mode</name>
<value>binary</value>
<description>
Expects one of [binary, http].
Transport mode of HiveServer2.
</description>
</property>
<property>
<name>hive.server2.authentication</name>
<value>NONE</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.authentication.class)
PAM: Pluggable authentication module
NOSASL: Raw transport
</description>
</property>
<property>
<name>hive.server2.thrift.http.port</name>
<value>10001</value>
<description>Port number of HiveServer2 Thrift interface when hive.server2.transport.mode is 'http'.</description>
</property>
<property>
<name>hive.server2.thrift.http.path</name>
<value>cliservice</value>
<description>Path component of URL endpoint when in HTTP mode.</description>
</property>
运行以下命令不会返回任何值:
netstat -an | grep 10000
netstat -an | grep 10001
beeline
要求HiveServer2
过程中运行。
如果这是一个 vanilla 安装,您可以使用此命令将 HiveServer2 作为后台进程启动,
nohup $HIVE_HOME/bin/hiveserver2 &
除此之外,您必须添加用户hiveuser
或通过直线连接时使用的任何用户作为代理用户才能访问 HDFS
将这些属性添加到 HDFS 的core-site.xml
并重新启动服务。
<property>
<name>hadoop.proxyuser.hiveuser.hosts</name>
<value>*</value>
</property>
<property>
<name>hadoop.proxyuser.hiveuser.groups</name>
<value>*</value>
</property>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.