Save a spark RDD to the local file system using Java

后端 未结 1 1488
没有蜡笔的小新
没有蜡笔的小新 2020-12-02 00:33

I have a RDD that is generated using Spark. Now if I write this RDD to a csv file, I am provided with some methods like \"saveAsTextFile()\" which outputs a csv file to the

相关标签:
1条回答
  • 2020-12-02 01:10

    saveAsTextFile is able to take in local file system paths (e.g. file:///tmp/magic/...). However, if your running on a distributed cluster, you most likely want to collect() the data back to the cluster and then save it with standard file operations.

    0 讨论(0)
提交回复
热议问题