how to distinct the spark rdd by the key?
<p>now, I have a RDD, which the records in the RDD are as follows:</p>

<pre><code>key1  value1
key1  value2
key2  value3
key3  value4
key3  value5
</code></pre>

<p>I want to  get the RDD records which have different keys ,as follows:</p>

<pre><code>key1  value1
key2  value3
key3  value4
</code></pre>

<p>I can just use the spark-core APIs and don't aggregate  values of the same key.</p>