You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-user@hadoop.apache.org by Farhan Husain <fa...@csebuet.org> on 2010/04/28 00:57:39 UTC

Output pair in Mapper.cleanup method

Hello,

Is it possible to output in Mapper.cleanup method since the Mapper.context
object is still available there?

Thanks,
Farhan

Re: Output pair in Mapper.cleanup method

Posted by Farhan Husain <fa...@csebuet.org>.
Thanks Eric.

On Tue, Apr 27, 2010 at 6:19 PM, Eric Sammer <es...@cloudera.com> wrote:

> Yes. It's a common pattern to buffer some amount of data in the map()
> method, flushing every N records and then to flush any remaining
> records in the cleanup() method.
>
> On Tue, Apr 27, 2010 at 6:57 PM, Farhan Husain
> <fa...@csebuet.org> wrote:
> > Hello,
> >
> > Is it possible to output in Mapper.cleanup method since the
> Mapper.context
> > object is still available there?
> >
> > Thanks,
> > Farhan
> >
>
>
>
> --
> Eric Sammer
> phone: +1-917-287-2675
> twitter: esammer
> data: www.cloudera.com
>

Re: Output pair in Mapper.cleanup method

Posted by Eric Sammer <es...@cloudera.com>.
Yes. It's a common pattern to buffer some amount of data in the map()
method, flushing every N records and then to flush any remaining
records in the cleanup() method.

On Tue, Apr 27, 2010 at 6:57 PM, Farhan Husain
<fa...@csebuet.org> wrote:
> Hello,
>
> Is it possible to output in Mapper.cleanup method since the Mapper.context
> object is still available there?
>
> Thanks,
> Farhan
>



-- 
Eric Sammer
phone: +1-917-287-2675
twitter: esammer
data: www.cloudera.com