Aviral Kumar Aviral Kumar - 9 days ago 6
Java Question

Store the value objects after joining two PairRDDs in spark

I have two PairRDDs in spark , for eg


(K1,V1) and (K1,V2)


I am trying to join these two RDDs and get the resultant joined RDD as :


(K1,List(V1,V2))


How can we do this ?

Answer

I used cogroup for this functionality.