I have the following code





*val nodes = lines.map(s =>{        val fields = s.split("\\s+")
(fields(0),fields(1))        }).distinct().groupByKey().cache()*
and when I print out the nodes RDD I get the following






*(4,ArrayBuffer(1))(2,ArrayBuffer(1))(3,ArrayBuffer(1))(1,ArrayBuffer(3, 2,
4))*
Now, I want to print only the key part of the RDD and also the maximum
value among the keys. How should I do that?
Thank You

Reply via email to