I have a users: RDD[(Long, Vertex)]
collection of users. I want to create links between my Vertex objects. The rule is: if two Vertex have the same value in a selected property - call it prop1, then a link exists.
My problem is how to check for every pair in the same collection. If I do:
val rels = users.map(
x => users.map(y => if(x._2.prop1 == y._2.prop1){(x._1, y._1)}))
I got back an RDD[RDD[Any]]
and not a RDD[(Long, Long)]
as expected for the Graph to work