org.apache.hadoop.mapred
Class Counters.Group

java.lang.Object
  extended by org.apache.hadoop.mapred.Counters.Group
Enclosing class:
Counters

public static class Counters.Group
extends Object

Represents a group of counters, comprising the counters from a particular counter enum class. This class handles localization of the class name and the counter names.


Method Summary
 long getCounter(String counter)
          Returns the value of the specified counter, or 0 if the counter does not exist.
 Collection<String> getCounterNames()
          Returns the counters for this group, with their names localized.
 String getDisplayName()
          Returns localized name of the group.
 String getDisplayName(String counter)
          Returns localized name of the specified counter.
 String getName()
          Returns raw name of the group.
 int size()
          Returns the number of counters in this group.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getName

public String getName()
Returns raw name of the group. This is the name of the enum class for this group of counters.


getDisplayName

public String getDisplayName()
Returns localized name of the group. This is the same as getName() by default, but different if an appropriate ResourceBundle is found.


getDisplayName

public String getDisplayName(String counter)
Returns localized name of the specified counter.


getCounterNames

public Collection<String> getCounterNames()
Returns the counters for this group, with their names localized.


getCounter

public long getCounter(String counter)
Returns the value of the specified counter, or 0 if the counter does not exist.


size

public int size()
Returns the number of counters in this group.



Copyright © 2006 The Apache Software Foundation