|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.mapreduce.counters.AbstractCounterGroup<T>
T
- type of the counter for the group@InterfaceAudience.Private public abstract class AbstractCounterGroup<T extends Counter>
An abstract class to provide common implementation of the generic counter group in both mapred and mapreduce package.
Constructor Summary | |
---|---|
AbstractCounterGroup(java.lang.String name,
java.lang.String displayName,
Limits limits)
|
Method Summary | |
---|---|
T |
addCounter(java.lang.String counterName,
java.lang.String displayName,
long value)
Add a counter to this group |
void |
addCounter(T counter)
Add a counter to this group. |
boolean |
equals(java.lang.Object genericRight)
|
T |
findCounter(java.lang.String counterName)
Find a counter in the group. |
T |
findCounter(java.lang.String counterName,
boolean create)
Find a counter in the group |
T |
findCounter(java.lang.String counterName,
java.lang.String displayName)
Find a counter in the group. |
java.lang.String |
getDisplayName()
Get the display name of the group. |
java.lang.String |
getName()
Get the internal name of the group |
int |
hashCode()
|
void |
incrAllCounters(CounterGroupBase<T> rightGroup)
Increment all counters by a group of counters |
java.util.Iterator<T> |
iterator()
|
protected abstract T |
newCounter()
Abstract factory method to create a new counter of type T |
protected abstract T |
newCounter(java.lang.String counterName,
java.lang.String displayName,
long value)
Abstract factory method to create a new counter of type T |
void |
readFields(java.io.DataInput in)
|
void |
setDisplayName(java.lang.String displayName)
Set the display name of the group |
int |
size()
|
void |
write(java.io.DataOutput out)
GenericGroup ::= displayName #counter counter* |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.hadoop.mapreduce.counters.CounterGroupBase |
---|
getUnderlyingGroup |
Constructor Detail |
---|
public AbstractCounterGroup(java.lang.String name, java.lang.String displayName, Limits limits)
Method Detail |
---|
public java.lang.String getName()
CounterGroupBase
getName
in interface CounterGroupBase<T extends Counter>
public java.lang.String getDisplayName()
CounterGroupBase
getDisplayName
in interface CounterGroupBase<T extends Counter>
public void setDisplayName(java.lang.String displayName)
CounterGroupBase
setDisplayName
in interface CounterGroupBase<T extends Counter>
displayName
- of the grouppublic void addCounter(T counter)
CounterGroupBase
addCounter
in interface CounterGroupBase<T extends Counter>
counter
- to addpublic T addCounter(java.lang.String counterName, java.lang.String displayName, long value)
CounterGroupBase
addCounter
in interface CounterGroupBase<T extends Counter>
counterName
- of the counterdisplayName
- of the countervalue
- of the counter
public T findCounter(java.lang.String counterName, java.lang.String displayName)
CounterGroupBase
findCounter
in interface CounterGroupBase<T extends Counter>
counterName
- the name of the counterdisplayName
- the display name of the counter
public T findCounter(java.lang.String counterName, boolean create)
CounterGroupBase
findCounter
in interface CounterGroupBase<T extends Counter>
counterName
- the name of the countercreate
- create the counter if not found if true
public T findCounter(java.lang.String counterName)
CounterGroupBase
findCounter
in interface CounterGroupBase<T extends Counter>
counterName
- the name of the counter
protected abstract T newCounter(java.lang.String counterName, java.lang.String displayName, long value)
counterName
- of the counterdisplayName
- of the countervalue
- of the counter
protected abstract T newCounter()
public java.util.Iterator<T> iterator()
iterator
in interface java.lang.Iterable<T extends Counter>
public void write(java.io.DataOutput out) throws java.io.IOException
write
in interface org.apache.hadoop.io.Writable
java.io.IOException
public void readFields(java.io.DataInput in) throws java.io.IOException
readFields
in interface org.apache.hadoop.io.Writable
java.io.IOException
public int size()
size
in interface CounterGroupBase<T extends Counter>
public boolean equals(java.lang.Object genericRight)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public void incrAllCounters(CounterGroupBase<T> rightGroup)
CounterGroupBase
incrAllCounters
in interface CounterGroupBase<T extends Counter>
rightGroup
- the group to be added to this group
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |