C
- the type of the Counter for the group@InterfaceAudience.Private public abstract class FileSystemCounterGroup<C extends Counter> extends java.lang.Object implements CounterGroupBase<C>
Modifier and Type | Class and Description |
---|---|
class |
FileSystemCounterGroup.FSCounter |
Constructor and Description |
---|
FileSystemCounterGroup() |
Modifier and Type | Method and Description |
---|---|
void |
addCounter(C counter)
Add a counter to this group.
|
C |
addCounter(java.lang.String name,
java.lang.String displayName,
long value)
Add a counter to this group
|
boolean |
equals(java.lang.Object genericRight) |
C |
findCounter(java.lang.String counterName)
Find a counter in the group.
|
C |
findCounter(java.lang.String counterName,
boolean create)
Find a counter in the group
|
C |
findCounter(java.lang.String scheme,
FileSystemCounter key) |
C |
findCounter(java.lang.String counterName,
java.lang.String displayName)
Find a counter in the group.
|
java.lang.String |
getDisplayName()
Get the display name of the group.
|
java.lang.String |
getName()
Get the internal name of the group
|
int |
hashCode() |
void |
incrAllCounters(CounterGroupBase<C> other)
Increment all counters by a group of counters
|
java.util.Iterator<C> |
iterator() |
protected abstract C |
newCounter(java.lang.String scheme,
FileSystemCounter key)
Abstract factory method to create a file system counter
|
void |
readFields(java.io.DataInput in) |
void |
setDisplayName(java.lang.String displayName)
Set the display name of the group
|
int |
size() |
void |
write(java.io.DataOutput out)
FileSystemGroup ::= #scheme (scheme #counter (key value)*)*
|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
getUnderlyingGroup
public java.lang.String getName()
CounterGroupBase
getName
in interface CounterGroupBase<C extends Counter>
public java.lang.String getDisplayName()
CounterGroupBase
getDisplayName
in interface CounterGroupBase<C extends Counter>
public void setDisplayName(java.lang.String displayName)
CounterGroupBase
setDisplayName
in interface CounterGroupBase<C extends Counter>
displayName
- of the grouppublic void addCounter(C counter)
CounterGroupBase
addCounter
in interface CounterGroupBase<C extends Counter>
counter
- to addpublic C addCounter(java.lang.String name, java.lang.String displayName, long value)
CounterGroupBase
addCounter
in interface CounterGroupBase<C extends Counter>
name
- of the counterdisplayName
- of the countervalue
- of the counterpublic C findCounter(java.lang.String counterName, java.lang.String displayName)
CounterGroupBase
findCounter
in interface CounterGroupBase<C extends Counter>
counterName
- the name of the counterdisplayName
- the display name of the counterpublic C findCounter(java.lang.String counterName, boolean create)
CounterGroupBase
findCounter
in interface CounterGroupBase<C extends Counter>
counterName
- the name of the countercreate
- create the counter if not found if truepublic C findCounter(java.lang.String counterName)
CounterGroupBase
findCounter
in interface CounterGroupBase<C extends Counter>
counterName
- the name of the counterpublic C findCounter(java.lang.String scheme, FileSystemCounter key)
protected abstract C newCounter(java.lang.String scheme, FileSystemCounter key)
scheme
- of the file systemkey
- the enum of the file system counterpublic int size()
size
in interface CounterGroupBase<C extends Counter>
public void incrAllCounters(CounterGroupBase<C> other)
CounterGroupBase
incrAllCounters
in interface CounterGroupBase<C extends Counter>
other
- the group to be added to this grouppublic void write(java.io.DataOutput out) throws java.io.IOException
write
in interface org.apache.hadoop.io.Writable
java.io.IOException
public void readFields(java.io.DataInput in) throws java.io.IOException
readFields
in interface org.apache.hadoop.io.Writable
java.io.IOException
public java.util.Iterator<C> iterator()
public boolean equals(java.lang.Object genericRight)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
Copyright © 2009 The Apache Software Foundation