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 dennis81 <dl...@gmail.com> on 2008/03/03 04:46:41 UTC

Counting the input bytes of a reduce task

Hi,

I was wondering how I can add a new counter in the "Map-Reduce Framework"
group of counters. Basically, I want to add a counter of the total number of
input bytes for the reduce task (like the one for the map task). I thought I
could just add another entry in the Enum type in Task.java and then
increment it, but that doesn't seem to be enough. I'd appreciate any advice
on how to do this.

Thanks in advance,
Dennis
-- 
View this message in context: http://www.nabble.com/Counting-the-input-bytes-of-a-reduce-task-tp15797258p15797258.html
Sent from the Hadoop core-user mailing list archive at Nabble.com.


Re: Counting the input bytes of a reduce task

Posted by Ted Dunning <td...@veoh.com>.

Just call reporter.incrCounter(specificEnumValueOfSomeKind, n)

where the first argument is some enum value.  The framework will work out
that it is your enum and put it in a box of its own along with any other
values.


On 3/2/08 7:46 PM, "dennis81" <dl...@gmail.com> wrote:

> 
> Hi,
> 
> I was wondering how I can add a new counter in the "Map-Reduce Framework"
> group of counters. Basically, I want to add a counter of the total number of
> input bytes for the reduce task (like the one for the map task). I thought I
> could just add another entry in the Enum type in Task.java and then
> increment it, but that doesn't seem to be enough. I'd appreciate any advice
> on how to do this.
> 
> Thanks in advance,
> Dennis