You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hadoop.apache.org by Mahesh Ogale <so...@gmail.com> on 2016/12/30 23:36:41 UTC

Get map and reduce phases counter values separately

Hello,

Here is one of the counters I am taking as an example:

Name                              Map     Reduce  Total
GC time elapsed (ms)    36,573  1,320     37,893

e.g.
${hadoop:counters('my-task-mr')['org.apache.hadoop.mapred.Task$Counter']['GC_TIME_MILLIS']}
- gives me total value 37893 (map + reduce), this works fine.

But I am not able to find anything yet to get the map and reduce values
separately.

${hadoop:counters('my-task-mr')['org.apache.hadoop.mapred.Task$Counter']['GC_TIME_MILLIS_I_AM_MAKING_THIS_UP_FOR_MAP']}
- should give me just map value (36573 from above snippet)
${hadoop:counters('my-task-mr')['org.apache.hadoop.mapred.Task$Counter']['GC_TIME_MILLIS_I_AM_MAKING_THIS_UP_FOR_REDUCE']}
- should give me just reduce value (1320 from above snippet)

Thanks,
Mahesh