mesos/spark — pull request #353 by stephenh (2013-01-05 19:13:16+00:00)
Title: Add RDD.tupleBy.

Given Spark requires joins/cogroups to be done on Tuple2s with the same key, it seems like a common operation is to take an RDD[YourRecordType] and turn it in to RDD[JoinKey, YourRecordType].

I had been using groupByKey as a short hand for doing this succinctly, but really didn't need/want the semantics of turning it into RDD[JoinKey, Seq[YourRecordType]], as that ended up complicating some logic downstream where I had to unrolling/de-Seq the RDD.

So, the suggested tupleBy is like groupBy, but without the group.