Look at the problem: Beeline reports an error when connecting to hiveserver2. Connection string: hive –service beeline -u jdbc:hive2://s1:10000/hive
Error: Error: Could not open client transport with JDBC Uri: jdbc:hive2://s1:10000 /hive: Failed to open new session: java.lang.RuntimeException: org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.security.authorize.AuthorizationException): User: xxx is not allowed to impersonate anonymous (state= 08S01,code=0)
Solution: add the following configuration to the hadoop configuration file core-site.xml, restart hdfs, where “xxx” is the user connected to beeline, replace “xxx” with yourself The username is sufficient
hadoop.proxyuser.xxx.hosts * hadoop.proxyuser.xxx.groups *
hadoop.proxyuser.xxx.hosts * hadoop.proxyuser.xxx.groups *
“*” means users, user groups and hosts that can operate hadoop through the super proxy “xxx”
< /p>
hadoop.proxyuser.xxx.hosts * hadoop.proxyuser.xxx.groups *