I\'m trying to filter an RDD of tuples to return the largest N tuples based on key values. I need the return format to be an RDD.
So the RDD:
[(4, \'
A less effort approach since you only want to convert take(N) results to new RDD.
take(N)
sc.parallelize(yourSortedRdd.take(Nth))