On Aug 28, 2008, at 2:55 PM, Tarandeep Singh wrote:

RunningJob rj = JobClient.runJob( ..)
Counters counters = rj.getCounters( )
long numRecords = counters.getCounter( key)

Good point! We should make those enums public somewhere. Probably in JobClient. I filed a jira on that as HADOOP-4043. In the mean time, you could either iterate through the counters looking for the one that you want or use:

long records = counters.findCounter("org.apache.hadoop.mapred.Task $Counter", 8,
     "REDUCE_OUTPUT_RECORDS").getCounter();

-- Owen

Reply via email to