Hi All,

If my RDD is having array/sequence of strings, how can I save them as a
HDFS file with each string on separate line?

For example if I write code as below, the output should get saved as hdfs
file having one string per line
...
...
var newLines = lines.map(line => myfunc(line));
newLines.saveAsTextFile(hdfsPath);
...
...
def myfunc(line: String):Array[String] = {
  line.split(";");
}

Thanks,
~Sarath.

Reply via email to