Saving RDD

Saving data from an RDD into a file system can be done by either:

  • saveAsTextFile
  • saveAsObjectFile

The following is an example of saving an RDD to a text file

scala> rdd_one.saveAsTextFile("out.txt")

There are many more ways of loading and saving data, particularly when integrating with HBase, Cassandra and so on.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.16.1.82