org.apache.pig.tools.counters
Class PigCounterHelper
java.lang.Object
org.apache.pig.tools.counters.PigCounterHelper
public class PigCounterHelper
- extends Object
A helper class to deal with Hadoop counters in Pig. They are stored within the singleton
PigStatusReporter instance, but are null for some period of time at job startup, even after
Pig has been invoked. This class buffers counters, trying each time to get a valid Reporter and flushing
stored counters each time it does.
Method Summary |
void |
incrCounter(Enum<?> key,
long incr)
Mocks the Reporter.incrCounter, but adds buffering. |
void |
incrCounter(String group,
String counterName,
long incr)
Mocks the Reporter.incrCounter, but adds buffering. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PigCounterHelper
public PigCounterHelper()
incrCounter
public void incrCounter(String group,
String counterName,
long incr)
- Mocks the Reporter.incrCounter, but adds buffering.
See org.apache.hadoop.mapred.Reporter's incrCounter.
incrCounter
public void incrCounter(Enum<?> key,
long incr)
- Mocks the Reporter.incrCounter, but adds buffering.
See org.apache.hadoop.mapred.Reporter's incrCounter.
Copyright © 2007-2012 The Apache Software Foundation