I think of an RDD as a bag of elements with no order or relationship to one another. Each element is independent of the other. The easiest way to experiment with a RDD is to create one from a Python ...
when running on an RDD of type T. find top-10 (or bottom-10) for your input, then mapPartitions() can work very well: find the top-10 (or bottom-10) per partition, then find the top-10 (or bottom-10) ...