title: Convert Resulting Rdd into HashMap
body: <p>I need to convert rdd into hashMap. I am having data in RDD like below:</p>
  
  <p>(FRUIT, List(Apple,Banana,Mango)) (VEGETABLE, List(Potato,Tomato))</p>
  
  <p>I am having below code currently</p>
  
  <pre><code>object JsonParse {
  
   def main(args: Array[String]){
  
  
  val sc = new SparkContext(new SparkConf().setAppName("JsonParse").setMaster("local"))
  
  val arr = Array(("FRUIT",List("Apple","Banana","Mango")),("VEGETABLE", List("Potato","Tomato")))
  
  val Rdd = sc.parallelize(arr)
  </code></pre>
  
  <p>how to proceed further??</p>