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.SchemaTypeinTypeClassoutTypeClasslog, 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, getInputTypeClassgetOutputTypeClass, getTypeArguments, safeIncrCounter, verifyInput, verifyUdfInputaddCredentials, allowCompileTimeCalculation, finish, getArgToFuncMapping, getCacheFiles, getInputSchema, getLoadCaster, getLogger, getPigLogger, getReporter, getReturnType, getSchemaName, getSchemaType, getShipFiles, isAsynchronous, needEndOfAllInputProcessing, outputSchema, progress, setEndOfAllInput, setInputSchema, setPigLogger, setReporter, setUDFContextSignature, warnpublic 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.ClassNotFoundExceptionjava.lang.NoSuchMethodExceptionjava.lang.IllegalAccessExceptionjava.lang.InstantiationExceptionjava.io.IOExceptionprotected 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.IOExceptionjava.lang.ClassNotFoundExceptionjava.lang.NoSuchMethodExceptionprotected FunctionWrapperEvalFunc(ExceptionalFunction function) throws java.io.IOException, java.lang.ClassNotFoundException, java.lang.NoSuchMethodException
function - Function to be used by the UDF.java.io.IOExceptionjava.lang.ClassNotFoundExceptionjava.lang.NoSuchMethodExceptionpublic java.lang.Object exec(java.lang.Object input)
throws java.io.IOException
exec in class PrimitiveEvalFunc<java.lang.Object,java.lang.Object>java.io.IOExceptionprotected java.lang.String getCounterGroup()
TypedOutputEvalFuncgetCounterGroup in class TypedOutputEvalFunc<java.lang.Object>Copyright © 2007-2025 The Apache Software Foundation