|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.mapred.Counters.Group
public class Counters.Group
Group of counters, comprising of counters from a particular
counter Enum class.
Grouphandles localization of the class name and the
counter names.
| Method Summary | |
|---|---|
boolean |
equals(Object obj)
Checks for (content) equality of Groups |
Counters.Counter |
getCounter(int id,
String name)
Deprecated. use getCounter(String) instead |
long |
getCounter(String counterName)
Returns the value of the specified counter, or 0 if the counter does not exist. |
Counters.Counter |
getCounterForName(String name)
Get the counter for the given name and create it if it doesn't exist. |
String |
getDisplayName()
Returns localized name of the group. |
String |
getName()
Returns raw name of the group. |
int |
hashCode()
|
Iterator<Counters.Counter> |
iterator()
|
String |
makeEscapedCompactString()
Returns the compact stringified version of the group in the format {(actual-name)(display-name)(value)[][][]} where [] are compact strings for the counters within. |
void |
readFields(DataInput in)
Deserialize the fields of this object from in. |
void |
setDisplayName(String displayName)
Set the display name |
int |
size()
Returns the number of counters in this group. |
void |
write(DataOutput out)
Serialize the fields of this object to out. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public String getName()
public String getDisplayName()
public void setDisplayName(String displayName)
public String makeEscapedCompactString()
public int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Objectpublic long getCounter(String counterName)
@Deprecated
public Counters.Counter getCounter(int id,
String name)
getCounter(String) instead
id - the numeric id of the counter within the groupname - the internal counter name
public Counters.Counter getCounterForName(String name)
name - the internal counter name
public int size()
public void write(DataOutput out)
throws IOException
Writableout.
write in interface Writableout - DataOuput to serialize this object into.
IOException
public void readFields(DataInput in)
throws IOException
Writablein.
For efficiency, implementations should attempt to re-use storage in the existing object where possible.
readFields in interface Writablein - DataInput to deseriablize this object from.
IOExceptionpublic Iterator<Counters.Counter> iterator()
iterator in interface Iterable<Counters.Counter>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||