How to save Spark RDD to local filesystem

2019-06-25 19:06发布

can i save a file into the local system with the saveAsTextFile syntax ? This is how i'm writing the syntax to save a file: insert_df.rdd.saveAsTextFile("<local path>")

when i'm trying to do this i'm getting error as no permissions, but i have all the permissions to that specific local path, looks like it is treating the file as HDFS file.

1条回答
一纸荒年 Trace。
2楼-- · 2019-06-25 19:38

I think you should try "file:///local path" instead of "/local path".

查看更多
登录 后发表回答