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

Switch to Plain View
HDFS >> mail # user >> Is the order of collected outputs in the map step preserved til the reduce step?

Björn-Elmar Macek 2012-05-10, 09:36
Copy link to this message
Re: Is the order of collected outputs in the map step preserved til the reduce step?
There is no such guarantee made by the framework. The only guarantee
is made at the key-sort level, that ensures that each iteration of
reduce() only carries one key and all associated values (in no
particular order) and that the keys overall are iterated in proper,
sorted order.

However, you can solve this form of a requirement using a secondary
sort technique:

On Thu, May 10, 2012 at 3:06 PM, Björn-Elmar Macek
> Hello all,
> i am currently working with a set of data which is chronologically ordered
> (every data element has a timestamp and they are monotonically increasing).
> Please correct me, if i am mistaken, but the data should "arrive"
> chronologically ordered at the mapper, right? But is the order in which i
> push values to the output preserved so that the Iterator given as a
> parameter of the reduce-function contains the values also chronologically
> ordered?
> Thank you for help in advance!
> Best regards,
> Björn

Harsh J