public class HiveUDF extends EvalFunc<Object>
| Modifier and Type | Class and Description |
|---|---|
protected static class |
HiveUDFBase.ConstantObjectInspectInfo |
protected static class |
HiveUDFBase.HiveReporter
A constant of Reporter type that does nothing.
|
EvalFunc.SchemaTypelog, pigLogger, reporter, returnType| Constructor and Description |
|---|
HiveUDF(String funcName) |
HiveUDF(String funcName,
String params) |
| Modifier and Type | Method and Description |
|---|---|
Object |
exec(Tuple input)
This callback method must be implemented by all subclasses.
|
void |
finish()
Placeholder for cleanup to be performed at the end.
|
protected static String |
getErrorMessage(Class c) |
List<String> |
getShipFiles()
Allow a UDF to specify a list of local files it would like placed in the distributed
cache.
|
protected static org.apache.hadoop.hive.ql.exec.MapredContext |
instantiateMapredContext() |
Schema |
outputSchema(Schema input)
Report the schema of the output of this UDF.
|
protected static Class |
resolveFunc(String funcName) |
allowCompileTimeCalculation, getArgToFuncMapping, getCacheFiles, getInputSchema, getLoadCaster, getLogger, getPigLogger, getReporter, getReturnType, getSchemaName, getSchemaType, isAsynchronous, needEndOfAllInputProcessing, progress, setEndOfAllInput, setInputSchema, setPigLogger, setReporter, setUDFContextSignature, warnpublic HiveUDF(String funcName) throws IOException, InstantiationException, IllegalAccessException
public HiveUDF(String funcName, String params) throws IOException, InstantiationException, IllegalAccessException
public Object exec(Tuple input) throws IOException
EvalFuncexec in class EvalFunc<Object>input - the Tuple to be processed.IOExceptionpublic List<String> getShipFiles()
EvalFuncFuncUtils for utility function to facilitate it
The default implementation returns null.public 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<Object>input - Schema of the inputpublic void finish()
EvalFuncprotected static Class resolveFunc(String funcName) throws IOException
IOExceptionprotected static org.apache.hadoop.hive.ql.exec.MapredContext instantiateMapredContext()
Copyright © 2007-2017 The Apache Software Foundation