|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.mapreduce.counters.AbstractCounters<org.apache.hadoop.mapred.Counters.Counter,org.apache.hadoop.mapred.Counters.Group>
org.apache.hadoop.mapred.Counters
Counters
instead.
@Deprecated @InterfaceAudience.Public @InterfaceStability.Stable public class Counters
A set of named counters.
Counters
represent global counters, defined either by the
Map-Reduce framework or applications. Each Counter
can be of
any Enum
type.
Counters
are bunched into Counters.Group
s, each comprising of
counters from a particular Enum
class.
Field Summary |
---|
Fields inherited from class org.apache.hadoop.mapreduce.counters.AbstractCounters |
---|
LOG |
Constructor Summary | |
---|---|
Counters()
Deprecated. |
|
Counters(Counters newCounters)
Deprecated. |
Method Summary | |
---|---|
org.apache.hadoop.mapred.Counters.Counter |
findCounter(String group,
int id,
String name)
Deprecated. use findCounter(String, String) instead |
org.apache.hadoop.mapred.Counters.Counter |
findCounter(String group,
String name)
Deprecated. Find a counter, create one if necessary |
static Counters |
fromEscapedCompactString(String compactString)
Deprecated. Convert a stringified (by makeEscapedCompactString() counter
representation into a counter object. |
long |
getCounter(Enum<?> key)
Deprecated. Returns current value of the specified counter, or 0 if the counter does not exist. |
void |
incrAllCounters(Counters other)
Deprecated. Increments multiple counters by their amounts in another Counters instance. |
void |
incrCounter(Enum<?> key,
long amount)
Deprecated. Increments the specified counter by the specified amount, creating it if it didn't already exist. |
void |
incrCounter(String group,
String counter,
long amount)
Deprecated. Increments the specified counter by the specified amount, creating it if it didn't already exist. |
void |
log(org.apache.commons.logging.Log log)
Deprecated. Logs the current counter values. |
String |
makeEscapedCompactString()
Deprecated. Represent the counter in a textual format that can be converted back to its object form |
int |
size()
Deprecated. use AbstractCounters.countCounters() instead |
static Counters |
sum(Counters a,
Counters b)
Deprecated. Convenience method for computing the sum of two sets of counters. |
Methods inherited from class org.apache.hadoop.mapreduce.counters.AbstractCounters |
---|
countCounters, equals, findCounter, getGroup, getGroupNames, hashCode, incrAllCounters, iterator, readFields, toString, write |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Counters()
public Counters(Counters newCounters)
Method Detail |
---|
public org.apache.hadoop.mapred.Counters.Counter findCounter(String group, String name)
AbstractCounters
findCounter
in class AbstractCounters<org.apache.hadoop.mapred.Counters.Counter,org.apache.hadoop.mapred.Counters.Group>
group
- of the countername
- name of the counter
@Deprecated public org.apache.hadoop.mapred.Counters.Counter findCounter(String group, int id, String name)
findCounter(String, String)
instead
group
- the name of the groupid
- the id of the counter within the group (0 to N-1)name
- the internal name of the counter
public void incrCounter(Enum<?> key, long amount)
key
- identifies a counteramount
- amount by which counter is to be incrementedpublic void incrCounter(String group, String counter, long amount)
group
- the name of the groupcounter
- the internal name of the counteramount
- amount by which counter is to be incrementedpublic long getCounter(Enum<?> key)
key
- the counter enum to lookup
public void incrAllCounters(Counters other)
other
- the other Counters instancepublic int size()
AbstractCounters.countCounters()
instead
public static Counters sum(Counters a, Counters b)
a
- the first countersb
- the second counters
public void log(org.apache.commons.logging.Log log)
log
- The log to use.public String makeEscapedCompactString()
public static Counters fromEscapedCompactString(String compactString) throws ParseException
makeEscapedCompactString()
counter
representation into a counter object.
compactString
- to parse
ParseException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |