Reduce Tuple2Integer, Integer to Tuple2Integer,ListInteger

2014-09-16 Thread Tom
From my map function I create Tuple2Integer, Integer pairs. Now I want to reduce them, and get something like Tuple2Integer, Listlt;Integer. The only way I found to do this was by treating all variables as String, and in the reduceByKey do /return a._2 + , + b._2/ //in which both are numeric

Re: Reduce Tuple2Integer, Integer to Tuple2Integer,ListInteger

2014-09-16 Thread Sean Owen
If you mean you have (key,value) pairs, and want pairs with key, and all values for that key, then you're looking for groupByKey On Tue, Sep 16, 2014 at 2:42 PM, Tom thubregt...@gmail.com wrote: From my map function I create Tuple2Integer, Integer pairs. Now I want to reduce them, and get