public class FunctionWrapperEvalFunc extends PrimitiveEvalFunc<java.lang.Object,java.lang.Object>
The Function must have a default no-arg constructor, which will be used. For Functions that
take args in the constructor, initialize the function in a subclass of this one and call
super(function)
.
Example: DEFINE myUdf FunctionWrapperEvalFunc('MyFunction')
EvalFunc.SchemaType
inTypeClass
outTypeClass
log, pigLogger, reporter, returnType
Modifier | Constructor and Description |
---|---|
protected |
FunctionWrapperEvalFunc(ExceptionalFunction function)
Determines the input and output types of the Function and initializes the superclass.
|
protected |
FunctionWrapperEvalFunc(com.google.common.base.Function function)
Determines the input and output types of the Function and initializes the superclass.
|
|
FunctionWrapperEvalFunc(java.lang.String functionClassName)
Takes the class name of a Function, initializes it using the default constructor and passes
it to FunctionWrapperEvalFunc(ExceptionalFunction function).
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
exec(java.lang.Object input) |
protected java.lang.String |
getCounterGroup()
Incremented counters will use this as the counter group.
|
exec, getInputTypeClass
getOutputTypeClass, getTypeArguments, safeIncrCounter, verifyInput, verifyUdfInput
allowCompileTimeCalculation, finish, getArgToFuncMapping, getCacheFiles, getInputSchema, getLoadCaster, getLogger, getPigLogger, getReporter, getReturnType, getSchemaName, getSchemaType, getShipFiles, isAsynchronous, needEndOfAllInputProcessing, outputSchema, progress, setEndOfAllInput, setInputSchema, setPigLogger, setReporter, setUDFContextSignature, warn
public FunctionWrapperEvalFunc(java.lang.String functionClassName) throws java.lang.ClassNotFoundException, java.lang.NoSuchMethodException, java.lang.IllegalAccessException, java.lang.InstantiationException, java.io.IOException
functionClassName
- function class to initializejava.lang.ClassNotFoundException
java.lang.NoSuchMethodException
java.lang.IllegalAccessException
java.lang.InstantiationException
java.io.IOException
protected FunctionWrapperEvalFunc(com.google.common.base.Function function) throws java.io.IOException, java.lang.ClassNotFoundException, java.lang.NoSuchMethodException
function
- Function to be used by the UDF.java.io.IOException
java.lang.ClassNotFoundException
java.lang.NoSuchMethodException
protected FunctionWrapperEvalFunc(ExceptionalFunction function) throws java.io.IOException, java.lang.ClassNotFoundException, java.lang.NoSuchMethodException
function
- Function to be used by the UDF.java.io.IOException
java.lang.ClassNotFoundException
java.lang.NoSuchMethodException
public java.lang.Object exec(java.lang.Object input) throws java.io.IOException
exec
in class PrimitiveEvalFunc<java.lang.Object,java.lang.Object>
java.io.IOException
protected java.lang.String getCounterGroup()
TypedOutputEvalFunc
getCounterGroup
in class TypedOutputEvalFunc<java.lang.Object>
Copyright © 2007-2017 The Apache Software Foundation