|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.mapreduce.Counters
@InterfaceAudience.Public @InterfaceStability.Stable public class Counters
Constructor Summary | |
---|---|
Counters()
|
|
Counters(Counters counters)
Utility method to create a Counters object from the org.apache.hadoop.mapred counters |
Method Summary | |
---|---|
void |
addGroup(CounterGroup group)
Add a group. |
int |
countCounters()
Returns the total number of counters, by summing the number of counters in each group. |
boolean |
equals(Object genericRight)
|
Counter |
findCounter(Enum<?> key)
Find the counter for the given enum. |
Counter |
findCounter(String groupName,
String counterName)
|
CounterGroup |
getGroup(String groupName)
Returns the named counter group, or an empty group if there is none with the specified name. |
Collection<String> |
getGroupNames()
Returns the names of all counter classes. |
int |
hashCode()
|
void |
incrAllCounters(Counters other)
Increments multiple counters by their amounts in another Counters instance. |
Iterator<CounterGroup> |
iterator()
|
void |
readFields(DataInput in)
Read a set of groups. |
String |
toString()
Return textual representation of the counter values. |
void |
write(DataOutput out)
Write the set of groups. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Counters()
public Counters(Counters counters)
counters
- Method Detail |
---|
public void addGroup(CounterGroup group)
public Counter findCounter(String groupName, String counterName)
public Counter findCounter(Enum<?> key)
key
- the counter key
public Collection<String> getGroupNames()
public Iterator<CounterGroup> iterator()
iterator
in interface Iterable<CounterGroup>
public CounterGroup getGroup(String groupName)
public int countCounters()
public void write(DataOutput out) throws IOException
write
in interface org.apache.hadoop.io.Writable
IOException
public void readFields(DataInput in) throws IOException
readFields
in interface org.apache.hadoop.io.Writable
IOException
public String toString()
toString
in class Object
public void incrAllCounters(Counters other)
other
- the other Counters instancepublic boolean equals(Object genericRight)
equals
in class Object
public int hashCode()
hashCode
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |