Finding the max value in Spark RDD

Viewed 14090

From the following, how can I get the tuple with the highest value?

Array[(String, Int)] = Array((a,30),(b,50),(c,20))

In this example the result I want would be (b,50)

5 Answers
Related