Convert it to a rdd then save the rdd to a file val str = "dank memes" sc.parallelize(List(str)).saveAsTextFile("str.txt")
On Fri, Aug 14, 2015 at 7:50 PM, go canal <goca...@yahoo.com.invalid> wrote: > Hello again, > online resources have sample code for writing RDD to a file, but I have a > simple string, how to save to a text file ? (my data is a DenseMatrix > actually) > > appreciate any help ! > > thanks, canal >