Compare two rdd and the values which match from the right rdd put it in the rdd
<p>I have 2 rdd</p>

<pre><code>rdd1       rdd2
1,abc      3,asd
2,edc      4,qwe 
3,wer      5,axc
4,ert
5,tyu
6,sdf
7,ghj
</code></pre>

<p>Compare the two rdd and once which match the with the id will be updated with the value from the rdd2 to the rdd1.
I understand that rdd are immutable so I consider that the new rdd will be made.
The output rdd will look something like this</p>

<pre><code>output rdd       
    1,abc      
    2,edc       
    3,asd      
    4,qwe
    5,axc
    6,sdf
    7,ghj
</code></pre>

<p>Its a basic thing but, I am new to spark and scala and trying things.</p>