Reputation: 367
For spark in python, do the sc.parallelize()
and collect()
operations preserve order?
For example if I have a list of elements x
, will sc.parallelize(x).collect()
return a list of elements in the exact same order as x
?
Upvotes: 7
Views: 1388
Reputation:
Both parallelize
and collect
preserve order. Most of the methods in Spark don't.
Upvotes: 1