It would be better to add one more transformation step before saveAsTextFile,
like:
rdd.map(tuple => "%s,%s,%s".format(tuple._1, tuple._2,
tuple._3)).saveAsTextFile(...)
By manually convert to the format you what, and then write to HDFS.
Thanks
Jerry
-Original Message-
From: SK [mailt
you can just use something like this:
myRdd(_.productIterator.mkString(",")).saveAsTextFile
On Tue, Jun 10, 2014 at 6:34 PM, SK wrote:
> My output is a set of tuples and when I output it using saveAsTextFile, my
> file looks as follows:
>
> (field1_tup1, field2_tup1, field3_tup1,...)
> (field