hiveserver2已启动并正在运行,我可以从http://localhost:10002/hiveserver2.jsp。Hive也在运行。直线出发后 >beeline
我想通过直线连接到hive jdbc:
!connect jdbc:hive2://localhost:10000/default
``` `hiveuser` 以及 `hivepassword` 在hive-site.xml上配置的也与在beeline-site.xml中配置的相同我有以下错误:
Error: Could not open client transport with JDBC Uri: jdbc:hive2://localhost:10000/default: Failed to open new session: java.lang.RuntimeException: org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.security.authorize.AuthorizationExce
ption): User: user is not allowed to impersonate hiveuser (state=08S01,code=0)
这是hive-site.xml内容
<property>
<name>hive.metastore.schema.verification</name>
<value>false</value>
</property>
<property>
<name>hive.server2.thrift.min.worker.threads</name>
<value>5</value>
<description>Minimum number of worker threads</description>
</property>
<property>
<name>hive.server2.thrift.max.worker.threads</name>
<value>500</value>
<description>Maximum number of worker threads</description>
</property>
<property>
<name>hiveconf hive.root.logger</name>
<value>INFO</value>
</property>
<property>
<name>hive.server2.enable.doAs</name>
<value>true</value>
</property>
<property>
<name>hive.server2.thrift.port</name>
<value>10000</value>
<description>TCP port number to listen on</description>
</property>
<property>
<name>hive.server2.authentication</name>
<value>NONE</value>
</property>
<property>
<name>javax.jdo.option.ConnectionURL</name>
<value>jdbc:mysql://localhost:3306/metastore_db?createDatabaseIfNotExist=true</value>
<description>metadata is stored in a MySQL server</description>
</property>
<property>
<name>javax.jdo.option.ConnectionDriverName</name>
<value>com.mysql.jdbc.Driver</value>
<description>MySQL JDBC driver class</description>
</property>
<property>
<name>javax.jdo.option.ConnectionUserName</name>
<value>hiveuser</value>
<description>user name for connecting to mysql server </description>
</property>
<property>
<name>javax.jdo.option.ConnectionPassword</name>
<value>hivepassword</value>
<description>password for connecting to mysql server </description>
</property>
<property>
<name>hive.metastore.warehouse.dir</name>
<value>/usr/hive/warehouse</value>
<description>location of default database for the warehouse</description>
</property>
<property>
<name>hadoop.proxyuser.hiveuser.hosts</name>
<value>*</value>
</property>
<property>
<name>hadoop.proxyuser.hiveuser.groups</name>
<value>*</value>
</property>
我遗漏了什么或者有什么解决办法?
暂无答案!
目前还没有任何答案,快来回答吧!