|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.tez.common.counters.FrameworkCounterGroup<T,C>
T - type of the counter enum classC - type of the counter@InterfaceAudience.Private public abstract class FrameworkCounterGroup<T extends Enum<T>,C extends TezCounter>
An abstract class to provide common implementation for the framework counter group in both mapred and mapreduce packages.
| Nested Class Summary | |
|---|---|
static class |
FrameworkCounterGroup.FrameworkCounter<T extends Enum<T>>
A counter facade for framework counters. |
| Constructor Summary | |
|---|---|
FrameworkCounterGroup(Class<T> enumClass)
|
|
| Method Summary | |
|---|---|
void |
addCounter(C counter)
Add a counter to this group. |
C |
addCounter(String name,
String displayName,
long value)
Add a counter to this group |
boolean |
equals(Object genericRight)
|
C |
findCounter(String counterName)
Find a counter in the group. |
C |
findCounter(String counterName,
boolean create)
Find a counter in the group |
C |
findCounter(String counterName,
String displayName)
Find a counter in the group. |
String |
getDisplayName()
Get the display name of the group. |
String |
getName()
Get the internal name of the group |
int |
hashCode()
|
void |
incrAllCounters(CounterGroupBase<C> other)
Increment all counters by a group of counters |
Iterator<C> |
iterator()
|
protected abstract C |
newCounter(T key)
Abstract factory method for new framework counter |
void |
readFields(DataInput in)
|
void |
setDisplayName(String displayName)
Set the display name of the group |
int |
size()
|
void |
write(DataOutput out)
FrameworkGroup ::= #counter (key value)* |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.tez.common.counters.CounterGroupBase |
|---|
getUnderlyingGroup |
| Constructor Detail |
|---|
public FrameworkCounterGroup(Class<T> enumClass)
| Method Detail |
|---|
public String getName()
CounterGroupBase
getName in interface CounterGroupBase<C extends TezCounter>public String getDisplayName()
CounterGroupBase
getDisplayName in interface CounterGroupBase<C extends TezCounter>public void setDisplayName(String displayName)
CounterGroupBase
setDisplayName in interface CounterGroupBase<C extends TezCounter>displayName - of the grouppublic void addCounter(C counter)
CounterGroupBase
addCounter in interface CounterGroupBase<C extends TezCounter>counter - to add
public C addCounter(String name,
String displayName,
long value)
CounterGroupBase
addCounter in interface CounterGroupBase<C extends TezCounter>name - of the counterdisplayName - of the countervalue - of the counter
public C findCounter(String counterName,
String displayName)
CounterGroupBase
findCounter in interface CounterGroupBase<C extends TezCounter>counterName - the name of the counterdisplayName - the display name of the counter
public C findCounter(String counterName,
boolean create)
CounterGroupBase
findCounter in interface CounterGroupBase<C extends TezCounter>counterName - the name of the countercreate - create the counter if not found if true
public C findCounter(String counterName)
CounterGroupBase
findCounter in interface CounterGroupBase<C extends TezCounter>counterName - the name of the counter
protected abstract C newCounter(T key)
key - for the enum value of a counter
public int size()
size in interface CounterGroupBase<C extends TezCounter>public void incrAllCounters(CounterGroupBase<C> other)
CounterGroupBase
incrAllCounters in interface CounterGroupBase<C extends TezCounter>other - the group to be added to this group
public void write(DataOutput out)
throws IOException
write in interface org.apache.hadoop.io.WritableIOException
public void readFields(DataInput in)
throws IOException
readFields in interface org.apache.hadoop.io.WritableIOExceptionpublic Iterator<C> iterator()
iterator in interface Iterable<C extends TezCounter>public boolean equals(Object genericRight)
equals in class Objectpublic int hashCode()
hashCode in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||