On Thu, Aug 28, 2008 at 2:39 PM, Owen O'Malley <[EMAIL PROTECTED]> wrote:

>
> On Aug 28, 2008, at 2:33 PM, Tarandeep Singh wrote:
>
>  Hi,
>>
>> I want to know how many records were written by the reducer via API.
>> Should
>> I define my own counter or is there a way to get the value of this
>> counter:
>> REDUCE_OUTPUT_RECORD,S that is used by mapred framework to display number
>> of
>> records written at the end of map reduce jobs?
>>
>
> Where do you want the value? The JobClient can get the value of the
> counters when the job is finished. Will that work?


How to get that value via JobClient? I was thinking of this approach-

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

But I need REDUCE_OUTPUT_RECORDS counter as key to call the above method and
this counter is not public.

Thanks,
Taran



>
> -- Owen
>

Reply via email to