|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.hadoop.mapreduce.Counter
public class Counter
A named counter that tracks the progress of a map/reduce job.
Counters
represent global counters, defined either by the
Map-Reduce framework or applications. Each Counter
is named by
an Enum
and has a long for the value.
Counters
are bunched into Groups, each comprising of
counters from a particular Enum
class.
Constructor Summary | |
---|---|
protected |
Counter()
|
protected |
Counter(String name,
String displayName)
|
Method Summary | |
---|---|
boolean |
equals(Object genericRight)
|
String |
getDisplayName()
Get the name of the counter. |
String |
getName()
|
long |
getValue()
What is the current value of this counter? |
int |
hashCode()
|
void |
increment(long incr)
Increment this counter by the given value |
void |
readFields(DataInput in)
Read the binary representation of the counter |
protected void |
setDisplayName(String displayName)
Deprecated. |
void |
setValue(long value)
Set this counter by the given value |
void |
write(DataOutput out)
Write the binary representation of the counter |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected Counter()
protected Counter(String name, String displayName)
Method Detail |
---|
@Deprecated protected void setDisplayName(String displayName)
public void readFields(DataInput in) throws IOException
readFields
in interface Writable
in
- DataInput
to deseriablize this object from.
IOException
public void write(DataOutput out) throws IOException
write
in interface Writable
out
- DataOuput
to serialize this object into.
IOException
public String getName()
public String getDisplayName()
public long getValue()
public void setValue(long value)
value
- the value to setpublic void increment(long incr)
incr
- the value to increase this counter bypublic 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 |