|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.mapreduce.Counter
@InterfaceAudience.Public @InterfaceStability.Stable 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)
|
|
Counter(String name,
String displayName,
long value)
Create a counter. |
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 |
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)
public Counter(String name, String displayName, long value)
name
- the name within the group's enum.displayName
- a name to be displayed.value
- the counter value.Method Detail |
---|
@Deprecated protected void setDisplayName(String displayName)
public void readFields(DataInput in) throws IOException
readFields
in interface org.apache.hadoop.io.Writable
IOException
public void write(DataOutput out) throws IOException
write
in interface org.apache.hadoop.io.Writable
IOException
public String getName()
public String getDisplayName()
public long getValue()
public 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 |