In practice it is almost always useful to have a map if only to designate the key for the reduce.
It might be slightly less common to need this if the TextInputFormat designated the first field (or a specified field) as the key, but it doesn't cost anything to use a mapper. On 9/19/07 3:21 PM, "Owen O'Malley" <[EMAIL PROTECTED]> wrote: > > On Sep 19, 2007, at 3:06 PM, Eric Zhang wrote: > >> I have a job which just wants to take advantage of the sorting >> function of >> reduce task, so no mapping is required. I am wondering if hadoop >> allows to >> run a job without running map . If it does, how to do it? and if it >> doesn't, could this be a reasonable feature to have? > > *Smile* If there are no maps, there is no where to get the input for > the reduce. > > I believe your intent is that nothing should happen in the map. You > can do this by using the org.apache.hadoop.mapred.lib.IdentityMapper. > In this case, the map is just passing the input straight to the sort > with no processing at all. > > -- Owen >
