We know that in spark there is a method rdd.collect which converts RDD to a list.
List f= rdd.collect(); String[] array = f.toArray(new String[f.si
There are two ways to convert a collection to a RDD.
1) sc.Parallelize(collection) 2) sc.makeRDD(collection)
Both of the method are identical, so we can use any of them