title: Creating Pair RDDs
body: <p>From the below RDD , I would like to create a pair RDD.</p>
  
  <pre><code>val line = sc.parallelize(Array("2,SMITH,AARON"))
  </code></pre>
  
  <p>I used the below code:</p>
  
  <pre><code>val pair = line.map(x =&gt; (x.split(",")(0).toInt, x))
  </code></pre>
  
  <p>The output generated is <code>Array[(Int, String)] = Array((2,2,SMITH,AARON))</code></p>
  
  <p>But I would like the desired output to be <code>Array[(Int, String)] = Array((2,SMITH,AARON))</code></p>
  
  <p>Pls help me out. 
  I am a newbie.</p>