C - type of counter inside the countersG - type of group inside the counters@InterfaceAudience.Public @InterfaceStability.Stable public abstract class AbstractCounters<C extends Counter,G extends CounterGroupBase<C>> extends Object implements Writable, Iterable<G>
| 修飾子とタイプ | フィールドと説明 | 
|---|---|
| protected static org.apache.commons.logging.Log | LOG | 
| コンストラクタと説明 | 
|---|
| AbstractCounters(AbstractCounters<C1,G1> counters,
                org.apache.hadoop.mapreduce.counters.CounterGroupFactory<C,G> groupFactory)Construct from another counters object. | 
| AbstractCounters(org.apache.hadoop.mapreduce.counters.CounterGroupFactory<C,G> gf) | 
| 修飾子とタイプ | メソッドと説明 | 
|---|---|
| int | countCounters()Returns the total number of counters, by summing the number of counters
 in each group. | 
| boolean | equals(Object genericRight) | 
| C | findCounter(Enum<?> key)Find the counter for the given enum. | 
| C | findCounter(String groupName,
           String counterName)Find a counter, create one if necessary | 
| G | getGroup(String groupName)Returns the named counter group, or an empty group if there is none
 with the specified name. | 
| Iterable<String> | getGroupNames()Returns the names of all counter classes. | 
| int | hashCode() | 
| void | incrAllCounters(AbstractCounters<C,G> other)Increments multiple counters by their amounts in another Counters
 instance. | 
| Iterator<G> | iterator() | 
| void | readFields(DataInput in)Deserialize the fields of this object from  in. | 
| String | toString()Return textual representation of the counter values. | 
| void | write(DataOutput out)Write the set of groups. | 
forEach, spliteratorprotected static final org.apache.commons.logging.Log LOG
@InterfaceAudience.Private public AbstractCounters(org.apache.hadoop.mapreduce.counters.CounterGroupFactory<C,G> gf)
@InterfaceAudience.Private public AbstractCounters(AbstractCounters<C1,G1> counters, org.apache.hadoop.mapreduce.counters.CounterGroupFactory<C,G> groupFactory)
C1 - type of the other counterG1 - type of the other counter groupcounters - the counters object to copygroupFactory - the factory for new groupspublic C findCounter(String groupName, String counterName)
groupName - of the countercounterName - name of the counterpublic C findCounter(Enum<?> key)
key - the counter keypublic Iterable<String> getGroupNames()
public Iterator<G> iterator()
iterator インタフェース内 Iterable<G extends CounterGroupBase<C>>public G getGroup(String groupName)
groupName - name of the grouppublic int countCounters()
public void write(DataOutput out) throws IOException
write インタフェース内 Writableout - DataOuput to serialize this object into.IOExceptionpublic void readFields(DataInput in) throws IOException
Writablein.  
 
 For efficiency, implementations should attempt to re-use storage in the existing object where possible.
readFields インタフェース内 Writablein - DataInput to deseriablize this object from.IOExceptionpublic void incrAllCounters(AbstractCounters<C,G> other)
other - the other Counters instanceCopyright © 2016 Apache Software Foundation. All rights reserved.