public class GroovyAccumulatorEvalFunc extends AccumulatorEvalFunc<Object>
EvalFunc.SchemaTypelog, pigLogger, reporter, returnType| Constructor and Description |
|---|
GroovyAccumulatorEvalFunc(String path,
String namespace,
String accumulatorMethod,
String accumulateMethod,
String getValueMethod,
String cleanupMethod) |
| Modifier and Type | Method and Description |
|---|---|
void |
accumulate(Tuple b)
Pass tuples to the UDF.
|
void |
cleanup()
Called after getValue() to prepare processing for next key.
|
Object |
getValue()
Called when all tuples from current key have been passed to accumulate.
|
Schema |
outputSchema(Schema input)
Report the schema of the output of this UDF.
|
execallowCompileTimeCalculation, finish, getArgToFuncMapping, getCacheFiles, getInputSchema, getLoadCaster, getLogger, getPigLogger, getReporter, getReturnType, getSchemaName, getSchemaType, getShipFiles, isAsynchronous, needEndOfAllInputProcessing, progress, setEndOfAllInput, setInputSchema, setPigLogger, setReporter, setUDFContextSignature, warnpublic GroovyAccumulatorEvalFunc(String path, String namespace, String accumulatorMethod, String accumulateMethod, String getValueMethod, String cleanupMethod) throws IOException
IOExceptionpublic void accumulate(Tuple b) throws IOException
Accumulatoraccumulate in interface Accumulator<Object>accumulate in class AccumulatorEvalFunc<Object>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 void cleanup()
Accumulatorcleanup in interface Accumulator<Object>cleanup in class AccumulatorEvalFunc<Object>public Object getValue()
AccumulatorgetValue in interface Accumulator<Object>getValue in class AccumulatorEvalFunc<Object>public Schema outputSchema(Schema input)
EvalFunc
The default implementation interprets the OutputSchema annotation,
if one is present. Otherwise, it returns null (no known output schema).
outputSchema in class EvalFunc<Object>input - Schema of the inputCopyright © 2007-2017 The Apache Software Foundation