title: Scala - Converting RDD to map
body: <p>I am a beginner in scala.</p>
  
  <p>I have a class User containing a <code>userId</code> as one of the attributes.
  I would like to convert RDD of users to a map with the <code>userId</code> as key and <code>user</code> as value.</p>
  
  <p>Thanks!</p>