Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
MapReduce >> mail # user >> custom task cleanup even when task is killed?


Copy link to this message
-
Re: custom task cleanup even when task is killed?
On 09/12/2010 02:38 AM, Chase Bradford wrote:
> I have a mapper class (extended from mapreduce.Mapper), where setup
> reports to an outside resource.  I want to make sure that most of the
> time when the task fails or is killed, a specific chunk of cleanup
> code is executed.

Just like there's a "setup(Mapper.Context context)" method, there's also
a "cleanup(Mapper.Context context)" method for just this purpose.

See:
http://hadoop.apache.org/common/docs/r0.20.1/api/org/apache/hadoop/mapreduce/Mapper.html#cleanup(org.apache.hadoop.mapreduce.Mapper.Context)

DR
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB