Thursday, March 12, 2020

Error: Failed to open new session: java.lang.RuntimeException: org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.security.authorize.AuthorizationException): User: nagaraju is not allowed to impersonate hive (state=,code=0)


Problem:


Start hiveserver2 daemon

$ hiveserver2

Start beeline client

$ beeline


Connect to hiveserver2

beeline> !connect jdbc:hive2://localhost:10000 "" ""

Error : 
Error: Failed to open new session: java.lang.RuntimeException: org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.security.authorize.AuthorizationException): User: nagaraju is not allowed to impersonate hive (state=,code=0)



Solution:


Stumbled across this thread while facing the same issue. I tried changing impersonation property in hive-site.xml to get it working. Hope this helps someone else.
  <property>
  <name>hive.server2.enable.doAs</name>
  <value>false</value> 
  </property>

No comments:

Post a Comment

Recent Post

Databricks Delta table merge Example

here's some sample code that demonstrates a merge operation on a Delta table using PySpark:   from pyspark.sql import SparkSession # cre...