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 Nathan Marz <na...@rapleaf.com> on 2008/07/03 19:17:43 UTC

Getting stats of running job from within job

Hi,

Is there a way to get stats of the currently running job  
programatically? Specifically, I want to detect from within my  
RecordWriter#close method two stats: number of reducers and number of  
completed reducers.

Alternatively, is there another way to detect from within RecordWriter  
or OutputFormat when the job has successfully completed?

Thanks,
Nathan

-----------------------------------------------
RapLeaf is hiring! We're looking for:
-System Administrator
-Product manager
-Software engineers

We offer $10,007 referral award.  Know of any?


Re: Getting stats of running job from within job

Posted by Doug Cutting <cu...@apache.org>.
Nathan Marz wrote:
> Is there a way to get stats of the currently running job 
> programatically?

This should probably be an FAQ.  In your Mapper or Reducer's configure 
implementation, you can get a handle on the running job with:

RunningJob running =
   new JobClient(job).getJob(job.get("mapred.job.id"));

Doug