Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
MapReduce >> mail # dev >> question about reduce method


Copy link to this message
-
Re: question about reduce method

Followings outputs are the correct.

<001,sales 35.99>
<002,sales 12.49>
<004,sales 13.42>
<003,sales 499.99>
<001,sales 78.95>
<002,sales 21.99>
<002,sales 93.45>
<001,sales 9.99>
<001,accounts John Allen>
<002,accounts Abigail Smith>
<003,accounts April Stevens>
<004,accounts Nasser Hafez>

The outputs are grouped and sorted by keys, and reducers process each
groups. The inputs of the reduce method are as follows:

<key: 001,
 values: {sales 35.99, sales 78.95, sales 9.99, accounts John Allen}>
<key: 002,
 values: {sales 12.49, sales 21.99, sales 93.45, accounts Abigail Smith}>
<key: 003,
 values: {sales 499.99, accounts April Stevens}>
<key: 004,
 values: {sales 13.42, accounts Nasser Hafez}>

Regards,
Akira

(2014/02/17 1:14), EdwardKing wrote: