Custom programmer-defined counters in MapReduce are:
Lightweight devices for bookkeeping within MapReduce programs.
Lightweight devices for ensuring the correctness of a MapReduce program. Mappers Increment
counters, and reducers decrement counters. If at the end of the program the counters read zero,
then you are sure that the job completed correctly.
Lightweight devices for synchronization within MapReduce programs. You can use counters to
coordinate execution between a mapper and a reducer.
Countersare a useful channel for gathering statistics about the job; for qualitycontrol, or for application-level statistics. They are also useful for problem diagnosis. Hadoop
maintains somebuilt-in counters for every job, which reports various metrics for your job.
Hadoop MapReduce also allows the user to define a set of user-defined counters that can be
incremented (or decremented by specifying a negative value as the parameter), by the driver,
mapper or the reducer.
Reference:Iterative MapReduce and Counters,Introduction to Iterative MapReduce and Counters