Apache Spark - Key Value RDD

25 / 29

If we have to find count of each unique word in an RDD having each word as record (var w = sc.parallelize(Array("this", "this", "is", "good", "is"))), which approach gives correct results?