Aviral Kumar Aviral Kumar - 10 months ago 72
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 Source

I used cogroup for this functionality.