Skip to main content
mike_bronson7
Gold ⭐️⭐️⭐️
Dec 2, 2019 7:45 AM UTC
Solved

SPARK Application + HDFS + User Airflow is not the owner of inode=alapati

we are runs spark application on hadoop cluster ( HDP version - 2.6.5 from hortonworks )

 

from the logs we can see the following Diagnostics

 

User: airflow
Application Type: SPARK
User class threw exception: org.apache.hadoop.security.AccessControlException: Permission denied. user=airflow is not the owner of inode=alapati


not clearly what we need to search in `HDFS` in order to find why we get Permission denied

Shelton
SheltonAnswer
Gold ⭐️⭐️⭐️
Dec 2, 2019 10:06 PM UTC

@mike_bronson7 

 

You can change the ownership of the HDFS  directory to airflow:hadoop  please do run the -chown command on / ??? It should something like /users/airflow/xxx

Please let me know

11 replies

Shelton
Gold ⭐️⭐️⭐️
Dec 2, 2019 7:56 AM UTC

@mike_bronson7 

 

That's a classic permissions issue "airflow" is trying to write to that directory but has no permissions as it's owned by alapati user  the inode=alapati.

The  easiest solution is to grant the permissions as the hdfs user

$ hdfs dfs -chown airflow:{$airflow_group}

Most components like Spark, Hive, sqoop  need to access HDFS

Translate
mike_bronson7
Gold ⭐️⭐️⭐️
Dec 2, 2019 8:10 AM UTC

how to found the airflow_group ?

Translate
Michael-Bronson
mike_bronson7
Gold ⭐️⭐️⭐️
Dec 2, 2019 8:17 AM UTC

Dear Shelton

 

do you mean :

 

grep airflow /etc/passwd
airflow:x:1016:1016::/home/airflow:/sbin/nologin
# id 1016
uid=1016(airflow) gid=1016(airflow) groups=1016(airflow),1005(hdfs)

 

so we need to perform :

 

$ hdfs dfs -chown airflow:1016

 

?

Translate
Michael-Bronson