public abstract class AccumulatorEvalFunc<T> extends EvalFunc<T> implements Accumulator<T>
Accumulator.EvalFunc.SchemaTypelog, pigLogger, reporter, returnType| Constructor and Description |
|---|
AccumulatorEvalFunc() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
accumulate(Tuple b)
Pass tuples to the UDF.
|
abstract void |
cleanup()
Called after getValue() to prepare processing for next key.
|
T |
exec(Tuple input)
This callback method must be implemented by all subclasses.
|
abstract T |
getValue()
Called when all tuples from current key have been passed to accumulate.
|
allowCompileTimeCalculation, finish, getArgToFuncMapping, getCacheFiles, getInputSchema, getLoadCaster, getLogger, getPigLogger, getReporter, getReturnType, getSchemaName, getSchemaType, getShipFiles, isAsynchronous, needEndOfAllInputProcessing, outputSchema, progress, setEndOfAllInput, setInputSchema, setPigLogger, setReporter, setUDFContextSignature, warnpublic abstract void accumulate(Tuple b) throws IOException
Accumulatoraccumulate in interface Accumulator<T>b - A tuple containing a single field, which is a bag. The bag will contain the set
of tuples being passed to the UDF in this iteration.IOExceptionpublic abstract void cleanup()
Accumulatorcleanup in interface Accumulator<T>public abstract T getValue()
AccumulatorgetValue in interface Accumulator<T>public T exec(Tuple input) throws IOException
EvalFuncexec in class EvalFunc<T>input - the Tuple to be processed.IOExceptionCopyright © 2007-2017 The Apache Software Foundation