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 Mohamed Riadh Trad <Mo...@inria.fr> on 2010/06/17 14:21:34 UTC

Closable Map

Hi all,

Is it possible to put instructions to be executed after all the record reader have been proceeded within a map? 

(on close() function??)

Regards.

Re: Closable Map

Posted by Aaron Kimball <aa...@cloudera.com>.
The Mapper class has a close() method. You can put arbitrary code in there.

You can even save a reference to the OutputCollector during the map()
method, and then emit "final" key, value pairs after the entire InputSplit
has been processed.

- Aaron

On Thu, Jun 17, 2010 at 5:22 AM, Mohamed Riadh Trad
<Mo...@inria.fr>wrote:

> I think that there is a closable() class on Java, what about hadoop pipes?
> Le 17 juin 2010 à 14:21, Mohamed Riadh Trad a écrit :
>
> > Hi all,
> >
> > Is it possible to put instructions to be executed after all the record
> reader have been proceeded within a map?
> >
> > (on close() function??)
> >
> > Regards.
>
>

Re: Closable Map

Posted by Mohamed Riadh Trad <Mo...@inria.fr>.
I think that there is a closable() class on Java, what about hadoop pipes?
Le 17 juin 2010 à 14:21, Mohamed Riadh Trad a écrit :

> Hi all,
> 
> Is it possible to put instructions to be executed after all the record reader have been proceeded within a map? 
> 
> (on close() function??)
> 
> Regards.