org.apache.hadoop.mapreduce.counters
Class FrameworkCounterGroup.FrameworkCounter<T extends Enum<T>>

java.lang.Object
  extended by org.apache.hadoop.mapreduce.counters.AbstractCounter
      extended by org.apache.hadoop.mapreduce.counters.FrameworkCounterGroup.FrameworkCounter<T>
All Implemented Interfaces:
org.apache.hadoop.io.Writable, Counter
Enclosing class:
FrameworkCounterGroup<T extends Enum<T>,C extends Counter>

@InterfaceAudience.Private
public static class FrameworkCounterGroup.FrameworkCounter<T extends Enum<T>>
extends AbstractCounter

A counter facade for framework counters. Use old (which extends new) interface to make compatibility easier.


Constructor Summary
FrameworkCounterGroup.FrameworkCounter(T ref, String groupName)
           
 
Method Summary
 String getDisplayName()
          Get the display name of the counter.
 String getGroupName()
           
 T getKey()
           
 String getName()
           
 Counter getUnderlyingCounter()
           
 long getValue()
          What is the current value of this counter?
 void increment(long incr)
          Increment this counter by the given value
 void readFields(DataInput in)
           
 void setValue(long value)
          Set this counter by the given value
 void write(DataOutput out)
           
 
Methods inherited from class org.apache.hadoop.mapreduce.counters.AbstractCounter
equals, hashCode, setDisplayName
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FrameworkCounterGroup.FrameworkCounter

public FrameworkCounterGroup.FrameworkCounter(T ref,
                                              String groupName)
Method Detail

getKey

@InterfaceAudience.Private
public T getKey()

getGroupName

@InterfaceAudience.Private
public String getGroupName()

getName

public String getName()
Returns:
the name of the counter

getDisplayName

public String getDisplayName()
Description copied from interface: Counter
Get the display name of the counter.

Returns:
the user facing name of the counter

getValue

public long getValue()
Description copied from interface: Counter
What is the current value of this counter?

Returns:
the current value

setValue

public void setValue(long value)
Description copied from interface: Counter
Set this counter by the given value

Parameters:
value - the value to set

increment

public void increment(long incr)
Description copied from interface: Counter
Increment this counter by the given value

Parameters:
incr - the value to increase this counter by

write

public void write(DataOutput out)
           throws IOException
Throws:
IOException

readFields

public void readFields(DataInput in)
                throws IOException
Throws:
IOException

getUnderlyingCounter

public Counter getUnderlyingCounter()


Copyright © 2013 Apache Software Foundation. All Rights Reserved.