Permission issue while saving the file on home directory- Pyspark


#1

Hi Team,

I am trying the save the file using pyspark in my home directory. Gettng below error:
at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.security.AccessControlException): Permission denied: user=learnspark101, access=WRITE, inode="/home/learnspark101/temp/revenue/_temporary/0":hdfs:hdfs:drwxr-xr-x

Code used to save the file is:
oMap.saveAsTextFile("/home/learnspark101/temp/revenue")

oMap s an RDD with order_id and revenue.

Please help. Thanks in Advance.


#2

Hi @My_Learning

If you are saving into your local machine use this command

saveAsTextFile(“file:////home/path”)