public abstract class AlgebraicIntMathBase extends EvalFunc<T> implements Accumulator<java.lang.Integer>
| Modifier and Type | Class and Description |
|---|---|
static class |
AlgebraicIntMathBase.Final |
static class |
AlgebraicIntMathBase.Intermediate |
static class |
AlgebraicMathBase.Initial |
protected static class |
AlgebraicMathBase.KNOWN_OP |
protected static interface |
AlgebraicMathBase.KnownOpProvider |
EvalFunc.SchemaType| Modifier and Type | Field and Description |
|---|---|
protected AlgebraicMathBase.KnownOpProvider |
opProvider |
log, pigLogger, reporter, returnType| Constructor and Description |
|---|
AlgebraicIntMathBase() |
| 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.
|
protected static java.lang.Integer |
doTupleWork(Tuple input,
AlgebraicMathBase.KnownOpProvider opProvider) |
java.lang.Integer |
exec(Tuple input)
This callback method must be implemented by all subclasses.
|
java.lang.String |
getFinal()
Get the final function.
|
java.lang.String |
getInitial()
Get the initial function.
|
java.lang.String |
getIntermed()
Get the intermediate function.
|
protected static java.lang.Integer |
getSeed(AlgebraicMathBase.KNOWN_OP op) |
java.lang.Integer |
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.
|
protected void |
setOp(AlgebraicMathBase.KNOWN_OP op) |
addCredentials, allowCompileTimeCalculation, finish, getArgToFuncMapping, getCacheFiles, getInputSchema, getLoadCaster, getLogger, getPigLogger, getReporter, getReturnType, getSchemaName, getSchemaType, getShipFiles, isAsynchronous, needEndOfAllInputProcessing, progress, setEndOfAllInput, setInputSchema, setPigLogger, setReporter, setUDFContextSignature, warnprotected AlgebraicMathBase.KnownOpProvider opProvider
protected static java.lang.Integer getSeed(AlgebraicMathBase.KNOWN_OP op)
protected static java.lang.Integer doTupleWork(Tuple input, AlgebraicMathBase.KnownOpProvider opProvider) throws ExecException
ExecExceptionpublic java.lang.Integer exec(Tuple input) throws java.io.IOException
EvalFuncpublic 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<java.lang.Integer>input - Schema of the inputpublic void accumulate(Tuple b) throws java.io.IOException
Accumulatoraccumulate in interface Accumulator<java.lang.Integer>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.java.io.IOExceptionpublic void cleanup()
Accumulatorcleanup in interface Accumulator<java.lang.Integer>public java.lang.Integer getValue()
AccumulatorgetValue in interface Accumulator<java.lang.Integer>protected void setOp(AlgebraicMathBase.KNOWN_OP op)
public java.lang.String getInitial()
AlgebraicgetInitial in interface Algebraicpublic java.lang.String getIntermed()
AlgebraicgetIntermed in interface Algebraicpublic java.lang.String getFinal()
AlgebraicCopyright © 2007-2025 The Apache Software Foundation