Hi Jim, Try something like:
Counters counters = job.getCounters(); counters.findCounter("org.apache.hadoop.mapred.Task$Counter", "REDUCE_INPUT_RECORDS").getCounter() The pre-defined counters are unfortunately not public and are not in one place in the source code, so you'll need to hunt to find them (search the source for the counter name you see in the web UI). I opened https://issues.apache.org/jira/browse/HADOOP-4043 a while back to address the fact they are not public. Please consider voting for it if you think it would be useful. Cheers, Tom On Mon, Dec 22, 2008 at 2:47 AM, Jim Twensky <jim.twen...@gmail.com> wrote: > Hello, > I need to collect some statistics using some of the counters defined by the > Map/Reduce framework such as "Reduce input records". I know I should use > the getCounter method from Counters.Counter but I couldn't figure how to > use it. Can someone give me a two line example of how to read the values for > those counters and where I can find the names/groups of the predefined > counters? > > Thanks in advance, > Jim >