I may be wrong, but I think RDDs must be created inside a SparkContext. To somehow preserve the order of the list, perhaps you could try something like:
sc.parallelize((1 to xs.size).zip(xs)) On Fri, Jun 13, 2014 at 6:08 PM, SK <skrishna...@gmail.com> wrote: > Hi, > > I have a List[ (String, Int, Int) ] that I would liek to convert to an RDD. > I tried to use sc.parallelize and sc.makeRDD, but in each case the original > order of items in the List gets modified. Is there a simple way to convert a > List to RDD without using SparkContext? > > thanks > > > > -- > View this message in context: > http://apache-spark-user-list.1001560.n3.nabble.com/convert-List-to-RDD-tp7606.html > Sent from the Apache Spark User List mailing list archive at Nabble.com.