Apache Hadoop FileSystem method copyToLocalFile is not working in cluster mode.
Hello, I have a scenario where I need to copy the file from HDFS to local file system on edge server.
When i run the code in cluster mode with spark submit , I am getting below kind of error:
User class threw exception: java.io.IOException: Mkdirs failed to create
/some_specific/path/in_edge_server (exists=false, cwd=file:/some/path/yarn/nm/usercache/1234/appcache/application_123456744/container_t1234)
It seems like it is trying to find the destination path where the execution takes place and since it is not finding the specific path it is trying to create a directory and failing?
Below is the function being used:
fs.copyToLocalFile(new Path(src_HDFSPath), new Path(dest_edgePath))
Do we have a solution to copy the file from HDFS to specific path of edge server when we run the program in cluster mode?

