hive2 pit

Login Issues:

User: xxx is not allowed to impersonate root 
beeline> !connect jdbc:hive2://hdp02:10000 root root;
Connecting to jdbc:hive2://hdp02:10000
20/03/24 01:50:19 [main]: WARN jdbc.HiveConnection: Failed to connect to hdp02:10000
Error: Could not open client transport with JDBC Uri: jdbc:hive2://hdp02:10000: Failed to open new session: java.lang.RuntimeException: org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.security.authorize.AuthorizationException): User: root is not allowed to impersonate root (state=08S01,code=0)

solve:

在hadoop的配置文件core-site.xml中添加如下属性:
<property>
        <name>hadoop.proxyuser.root.hosts</name>
        <value>*</value>
</property>
<property>
        <name>hadoop.proxyuser.root.groups</name>
        <value>*</value>
</property>

 

Xxx will be configured and set hadoop.proxyuser.xxx.groups in hadoop.proxyuser.xxx.hosts above is root (ie User display your error log: xxx Why Why set). "*" May be represented by the super agent "xxx" operation hadoop users, user groups, and hosts. Restart hdfs. The reason for such a change: The main reason is the introduction of a hadoop disguised security mechanism, so that the upper hadoop system does not allow the user to directly transfer the actual hadoop layer but actually passes to a super user agent, whereby the agent to perform operations on hadoop to avoid any client operating freely hadoop

Question two:

The wrong version, hive to spark version has strict requirements, in particular the corresponding version you can download the source code inside the hive, search spark version of his pom.xml file inside, if the wrong version, after starting hive error. Specific errors are as follows:

Failed to execute spark task, with exception 'org.apache.hadoop.hive.ql.metadata.HiveException(Failed to create spark client.)' FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.spark.SparkTask

hive Version spark Version
3.0.x 2.3.0
2.3.x 2.0.0
2.2.x 1.6.0
2.1.x 1.6.0
2.0.x 1.5.0
1.2.x 1.3.1
1.1.x 1.2.0

 

Guess you like

Origin www.cnblogs.com/yaoss/p/12577765.html