I use JDBC to connect to HiverServer2, but failed??
I add the following content to the Hadoop's core-site.xml:
<property>
<name>hadoop.proxyuser.root.hosts</name>
<value>*</value>
</property>
<property>
<name>hadoop.proxyuser.root.groups</name>
<value>*</value>
</property>
But get the following message all the same, how can I solved it?
Servlet.service() for servlet [dispatcherServlet] in context with path []
threw exception [Request processing failed; nested exception is
java.sql.SQLException: Could not open client transport with JDBC Uri:
jdbc:hive2://192.168.96.130: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] with root cause
java.lang.RuntimeException: org.apache.hadoop.ipc.RemoteException:User: root is
not allowed to impersonate root
at org.apache.hadoop.ipc.Client.getRpcResponse(Client.java:1511)
~[na:na]
at org.apache.hadoop.ipc.Client.call(Client.java:1457) ~[na:na]
at org.apache.hadoop.ipc.Client.call(Client.java:1367) ~[na:na]
at
org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(ProtobufRpcEngine.java:228)
~[na:na]
at
org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(ProtobufRpcEngine.java:116)
~[na:na]
at com.sun.proxy.$Proxy29.getFileInfo(Unknown Source) ~[na:na]
at
org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolTranslatorPB.getFileInfo(ClientNamenodeProtocolTranslatorPB.java:900)
~[na:na]
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) ~[na:na]
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
~[na:na]
at java.lang.reflect.Method.invoke(Method.java:497) ~[na:na]
at
org.apache.hadoop.io.retry.RetryInvocationHandler.invokeMethod(RetryInvocationHandler.java:422)
~[na:na]
at
org.apache.hadoop.io.retry.RetryInvocationHandler$Call.invokeMethod(RetryInvocationHandler.java:165)
~[na:na]
at
org.apache.hadoop.io.retry.RetryInvocationHandler$Call.invoke(RetryInvocationHandler.java:157)
~[na:na]