Class Counters

  extended by org.apache.hadoop.mapreduce.counters.AbstractCounters<Counter,CounterGroup>
      extended by org.apache.hadoop.mapreduce.Counters
All Implemented Interfaces:
Iterable<CounterGroup>, Writable

public class Counters
extends AbstractCounters<Counter,CounterGroup>

Counters holds per job/task counters, defined either by the Map-Reduce framework or applications. Each Counter can be of any Enum type.

Counters are bunched into CounterGroups, each comprising of counters from a particular Enum class.

Field Summary
Fields inherited from class org.apache.hadoop.mapreduce.counters.AbstractCounters
Constructor Summary
          Default constructor
Counters(AbstractCounters<C,G> counters)
          Construct the Counters object from the another counters object
Method Summary
Methods inherited from class org.apache.hadoop.mapreduce.counters.AbstractCounters
countCounters, equals, findCounter, findCounter, getGroup, getGroupNames, hashCode, incrAllCounters, iterator, readFields, toString, write
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail


public Counters()
Default constructor


public Counters(AbstractCounters<C,G> counters)
Construct the Counters object from the another counters object

Type Parameters:
C - the type of counter
G - the type of counter group
counters - the old counters object

Copyright © 2014 Apache Software Foundation. All Rights Reserved.