how to get max value in spark rdd and remove it?
<p>there is a RDD object:</p>

<pre><code>//have some data in RDD[(Int, Int)] object
(1, 2)
(3, 2)
(2, 3)
(5, 4)
(2, 7)
(5, 2)
(5, 7)
</code></pre>

<p>I want to get max key and remove it, the max key is 5, so the result I want is:</p>

<pre><code>//a new RDD object,RDD[(Int, Int)]
(1, 2)
(3, 2)
(2, 3)
(2, 7)
</code></pre>

<p>Could you help me? Thank you!</p>