hadoop-common-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jim Twensky" <jim.twen...@gmail.com>
Subject Re: Predefined counters
Date Mon, 22 Dec 2008 19:32:50 GMT
Hello Tom,

Thanks for the swift response. That really worked, I'll vote for what you
suggested now.

Cheers,
Jim

On Mon, Dec 22, 2008 at 5:09 AM, Tom White <tom@cloudera.com> wrote:

> 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.twensky@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
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message