hadoop-common-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yaron Gonen <yaron.go...@gmail.com>
Subject MAP_INPUT_RECORDS counter in the reducer
Date Tue, 17 Sep 2013 10:09:37 GMT
Hi,
Is there a way for the reducer to get the total number of input records to
the map phase?
For example, I want the reducer to normalize a sum by dividing it in the
number of records. I tried getting the value of that counter by using the
line:

context.getCounter(Task.Counter.MAP_INPUT_RECORDS).getValue();

in the reducer code, but I got 0.

Thanks!
Yaron

Mime
View raw message