Which operations preserve RDD order?
All operations preserve the order, except those that explicitly do not. Ordering is always “meaningful”, not just after a sortBy. For example, if you read a file (sc.textFile) the lines of the RDD will be in the order that they were in the file. Without trying to give a complete list, map, filter and flatMap … Read more