public abstract class TypedOutputEvalFunc<OUT> extends EvalFunc<OUT>
OUT exec(Tuple input)method when writting a UDF that operates on multiple inputs from the Tuple.
EvalFunc.SchemaType| Modifier and Type | Field and Description |
|---|---|
protected java.lang.Class<OUT> |
outTypeClass |
log, pigLogger, reporter, returnType| Constructor and Description |
|---|
TypedOutputEvalFunc() |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.String |
getCounterGroup()
Incremented counters will use this as the counter group.
|
java.lang.Class<OUT> |
getOutputTypeClass() |
protected static <T> java.util.List<java.lang.Class<?>> |
getTypeArguments(java.lang.Class<T> baseClass,
java.lang.Class<? extends T> childClass)
Get the actual type arguments a child class has used to extend a generic base class.
|
protected static void |
safeIncrCounter(java.lang.String group,
java.lang.String name,
java.lang.Long increment) |
protected void |
verifyInput(Tuple input,
int minimumSize) |
protected static void |
verifyUdfInput(java.lang.String klass,
Tuple input,
int minimumSize)
Increment Hadoop counters for bad inputs which are either null or too small.
|
addCredentials, allowCompileTimeCalculation, exec, finish, getArgToFuncMapping, getCacheFiles, getInputSchema, getLoadCaster, getLogger, getPigLogger, getReporter, getReturnType, getSchemaName, getSchemaType, getShipFiles, isAsynchronous, needEndOfAllInputProcessing, outputSchema, progress, setEndOfAllInput, setInputSchema, setPigLogger, setReporter, setUDFContextSignature, warnprotected java.lang.Class<OUT> outTypeClass
public java.lang.Class<OUT> getOutputTypeClass()
protected void verifyInput(Tuple input, int minimumSize) throws java.io.IOException
java.io.IOExceptionprotected java.lang.String getCounterGroup()
protected static <T> java.util.List<java.lang.Class<?>> getTypeArguments(java.lang.Class<T> baseClass,
java.lang.Class<? extends T> childClass)
baseClass - the base classchildClass - the child classprotected static void verifyUdfInput(java.lang.String klass,
Tuple input,
int minimumSize)
throws java.io.IOException
klass - the name of the calling class, for recording purposesinput - the tuple passed to the UDF.minimumSize - the minimum size required of the tuple.java.io.IOExceptionprotected static void safeIncrCounter(java.lang.String group,
java.lang.String name,
java.lang.Long increment)
Copyright © 2007-2025 The Apache Software Foundation