My mapper needs to send the following tuples:
And I want to send to reducer the custID as a key, and as value th
The simplest I can think of is just to merge them into a single string:
output.collect(custID, prodID + "," + rate);
Then, split if back up on the reducers.
If you post a little more code from your mapper maybe we could give a better example.
UPDATE: That said, you asked for the best way. The most correct way is probably to create a separate class grouping prodID
and rate
together and send that.