Re: Extracting values from a Collecion

2014-11-22 Thread Sanjay Subramanian
I could not iterate thru the set but changed the code to get what I was looking for(Not elegant but gets me going) package org.medicalsidefx.common.utils import org.apache.spark.{SparkConf, SparkContext} import org.apache.spark.SparkContext._ import scala.collection.mutable.ArrayBuffer /** * C

Re: Extracting values from a Collecion

2014-11-22 Thread Sanjay Subramanian
Thanks Jeyregardssanjay From: Jey Kottalam To: Sanjay Subramanian Cc: Arun Ahuja ; Andrew Ash ; user Sent: Friday, November 21, 2014 10:07 PM Subject: Extracting values from a Collecion Hi Sanjay, These are instances of the standard Scala collection type "Set", and its document

Re: Extracting values from a Collecion

2014-11-21 Thread Sanjay Subramanian
I am sorry the last line in the code is  file1Rdd.join(file2RddGrp.mapValues(names => names.toSet)).collect().foreach(println) so  My Code===val file1Rdd = sc.textFile("/Users/sansub01/mycode/data/songs/names.txt").map(x => (x.split(",")(0), x.split(",")(1)))val file2Rdd = sc.textFile("/Use