How to inspect the value on a rdd after map


#1

This is about lecture 68:

What I want is to inspect the value of the l_map below:

val l = List(“Hello”, “How are you doing”, “Let us perform word count”, “As part of the word count program”, “we will see how many times each word repeat”)

//create RDD by parallelize the list
val l_rdd = sc.parallelize(l)

scala> l_rdd.take(5).foreach(println)
Hello
How are you doing
Let us perform word count
As part of the word count program
we will see how many times each word repeat

//create a new RDD using map on the RDD
val l_map = l_rdd.map(ele => ele.split(" "))
scala> l_map.take(5).foreach(println)
[Ljava.lang.String;@52681909
[Ljava.lang.String;@f5c9316
[Ljava.lang.String;@47bd62db
[Ljava.lang.String;@4083443e
[Ljava.lang.String;@52b1bd76

Can anyone help?

Thank you very much.