hadoop-mapreduce-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Lilley <john.lil...@redpoint.net>
Subject RE: Hadoop execution sequence
Date Tue, 15 Jan 2013 14:56:17 GMT
I think it will help for Ouch to clarify what is meant by "in order".  If one JSON file must
be completely processed before the next file starts, there is not much point to using MapReduce
at all, since your problem cannot be partitioned.  On the other hand, there may be ways around
this, for example:

*         Use the file timestamps as keys into whatever the target data store is, so that
JSON->records->insert can proceed in parallel.

*         Perform a pass on the JSON files, generating "sequence numbers" based on the file
times.  Then process MR jobs where the {Sequence,Filename} is the tuple into mapper, and some
stream of {Sequence,FileData} is on output.  The sort/shuffle by Sequence would present a
time-ordered stream to the reducers.  Then if absolute order is needed, use a single reducer.

Caveat: I may not know what I am talking about ;-)

From: Mahesh Balija [mailto:balijamahesh.mca@gmail.com]
Sent: Tuesday, January 15, 2013 7:47 AM
To: user@hadoop.apache.org
Subject: Re: Hadoop execution sequence

As per the Mapreduce behavior, mapper will process all the input file(s) in parallel. i.e.,
no order is guaranteed among the input files.
If you want to process each file separately and maintain the order  then you need to process
each file separately (in an independent mapreduce job) so that your client is responsible
for processing individual file in order.

Mahesh Balija,
Calsoft Labs.
On Tue, Jan 15, 2013 at 7:55 PM, Panshul Whisper <ouchwhisper@gmail.com<mailto:ouchwhisper@gmail.com>>


I was wondering if hadoop performs the map reduce operations on the data in maintaining he
order or sequence of data in which it received the data.
I have a hadoop cluster that is receiving json files.. Which are processed and then stored
on base.
For correct calculation it is essential for the json files to be processed on the order they
are received. How can I make sure this happens.

Thanking you,

Ouch Whisper

View raw message