public abstract class AlgebraicEvalFunc<T> extends AccumulatorEvalFunc<T> implements Algebraic
Accumulator
for more information on how to do so.EvalFunc.SchemaType
log, pigLogger, reporter, returnType
Constructor and Description |
---|
AlgebraicEvalFunc(String... constructorArgs)
It is key that if a subclass has a constructor, that it calls super(args...) or else
this class will not instantiate properly.
|
Modifier and Type | Method and Description |
---|---|
void |
accumulate(Tuple input)
This is the free accumulate implementation based on the static classes provided
by the Algebraic static classes.
|
void |
cleanup()
Per the Accumulator interface, this clears all of the variables used in the implementation.
|
abstract String |
getFinal()
This must be implement as per a normal Algebraic interface.
|
abstract String |
getInitial()
This must be implement as per a normal Algebraic interface.
|
abstract String |
getIntermed()
This must be implement as per a normal Algebraic interface.
|
T |
getValue()
This function returns the ultimate result.
|
exec
allowCompileTimeCalculation, finish, getArgToFuncMapping, getCacheFiles, getInputSchema, getLoadCaster, getLogger, getPigLogger, getReporter, getReturnType, getSchemaName, getSchemaType, getShipFiles, isAsynchronous, needEndOfAllInputProcessing, outputSchema, progress, setEndOfAllInput, setInputSchema, setPigLogger, setReporter, setUDFContextSignature, warn
public AlgebraicEvalFunc(String... constructorArgs)
public abstract String getFinal()
Algebraic
for
more information.public abstract String getInitial()
Algebraic
for
more information.getInitial
in interface Algebraic
public abstract String getIntermed()
Algebraic
for
more information.getIntermed
in interface Algebraic
public void accumulate(Tuple input) throws IOException
accumulate
in interface Accumulator<T>
accumulate
in class AccumulatorEvalFunc<T>
input
- 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.IOException
public void cleanup()
cleanup
in interface Accumulator<T>
cleanup
in class AccumulatorEvalFunc<T>
public T getValue()
getValue
in interface Accumulator<T>
getValue
in class AccumulatorEvalFunc<T>
Copyright © 2007-2017 The Apache Software Foundation