Map key, value pair based on similarity of their value in Spark
问题 I have been learning Spark for several weeks, currently I am trying to group several items or people based on their connection using Spark and Hadoop in Scala. For example, I want to see how football players are connected based on their club history. My "players" rdd would be: (John, FC Sion) (Mike, FC Sion) (Bobby, PSV Eindhoven) (Hans, FC Sion) I want to have rdd like this: (John, <Mike, Hans>) (Mike, <John, Hans>) (Bobby, <>) (Hans, <Mike, John>) I plan to use map to accomplish this. val