org.apache.hadoop.mrunit.counters
Class CounterWrapper

java.lang.Object
  extended by org.apache.hadoop.mrunit.counters.CounterWrapper

public class CounterWrapper
extends Object

Wrapper around Counters from both mapred and mapreduce packages so that we can work with both counter classes in the same way.


Constructor Summary
CounterWrapper(org.apache.hadoop.mapred.Counters counters)
          Wrap old counter object
CounterWrapper(org.apache.hadoop.mapreduce.Counters counters)
          Wrap new counter object
 
Method Summary
 long findCounterValue(Enum e)
          Get counter value based on Enumeration
 long findCounterValue(String group, String name)
          Get counter value based on name
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CounterWrapper

public CounterWrapper(org.apache.hadoop.mapred.Counters counters)
Wrap old counter object

Parameters:
counters -

CounterWrapper

public CounterWrapper(org.apache.hadoop.mapreduce.Counters counters)
Wrap new counter object

Parameters:
counters -
Method Detail

findCounterValue

public long findCounterValue(Enum e)
Get counter value based on Enumeration

Parameters:
e -
Returns:

findCounterValue

public long findCounterValue(String group,
                             String name)
Get counter value based on name

Parameters:
group -
name -
Returns:


Copyright © 2012 The Apache Software Foundation. All Rights Reserved.