You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-user@hadoop.apache.org by Giridhar Addepalli <gi...@komli.com> on 2011/02/02 10:27:58 UTC

is configure( ) method of mapred api same as setup( ) method of mapreduce api

Hi,

setup( ),  method present in mapred api, is called once at the start of
each map/reduce task.
Is it the same with configure( ) method present in mapreduce api ?

Thanks,
Giridhar.

Re: is configure( ) method of mapred api same as setup( ) method of mapreduce api

Posted by Harsh J <qw...@gmail.com>.
Yes, configure() and setup() are very similar in functionality. What
you had to do in configure() of the stable API, you'll have to do so
in the setup() of the newer replacement.

In some ways, the configure() is more old-fashioned than setup(). A
setup call occurs when the Mapper is run, while configure() used to
occur when the Mapper class was instantiated (via ReflectionUtils).
Thus, you get a full Context object in setup (which was absent in
configure()). Thats to say a setup() may be more useful than
configure().

But I've always felt comfortable using the MapRunner/Mapper.run()
techniques to run the Mapper. That way, you're in good control of
pre/post stuff.

On Wed, Feb 2, 2011 at 2:57 PM, Giridhar Addepalli
<gi...@komli.com> wrote:
> Hi,
>
> setup( ),  method present in mapred api, is called once at the start of
> each map/reduce task.
> Is it the same with configure( ) method present in mapreduce api ?
>
> Thanks,
> Giridhar.
>



-- 
Harsh J
www.harshj.com