I am noticing kerberos user conflict when using Python Impyla package.
I am authenticated with a kerberos user. lets name the kerberos username as 'test'. After running kinit command for 'test' user, I verified the krb ticket cache (klist).
After this, I executed a python script having impyla package. This script makes a connection to hive and runs a hive insert query. During the insert operation I get following error.
impala.error.HiveServer2Error: Error while compiling statement: FAILED: RuntimeException Cannot create staging directory '<hdfs-path>': Permission denied: user=hive, access=WRITE, inode="<hdfs-path>":test:test:drwxr-xr-x
The hdfs path/directory is owned by the kerberos user 'test'. In kerberos ticket cache, the default principal is 'test' user principal. But, in the error, it says Permission Denied: user is 'hive'.
Why/How 'hive' user is coming into picture when my default principal is 'test' user principal ?
Any advice ?
This is not the case when I ran the same insert query in hive shell. It runs with test user principal and inserts the records into hdfs path without any issue.