public class HiveUDTF extends EvalFunc<java.lang.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.SchemaType
log, pigLogger, reporter, returnType
Constructor and Description |
---|
HiveUDTF(java.lang.String funcName) |
HiveUDTF(java.lang.String funcName,
java.lang.String params) |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
exec(Tuple input)
This callback method must be implemented by all subclasses.
|
protected static java.lang.String |
getErrorMessage(java.lang.Class c) |
java.util.List<java.lang.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() |
boolean |
needEndOfAllInputProcessing() |
Schema |
outputSchema(Schema input)
Report the schema of the output of this UDF.
|
protected static java.lang.Class |
resolveFunc(java.lang.String funcName) |
void |
setEndOfAllInput(boolean endOfAllInput) |
allowCompileTimeCalculation, finish, getArgToFuncMapping, getCacheFiles, getInputSchema, getLoadCaster, getLogger, getPigLogger, getReporter, getReturnType, getSchemaName, getSchemaType, isAsynchronous, progress, setInputSchema, setPigLogger, setReporter, setUDFContextSignature, warn
public HiveUDTF(java.lang.String funcName) throws java.lang.InstantiationException, java.lang.IllegalAccessException, java.io.IOException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.io.IOException
public HiveUDTF(java.lang.String funcName, java.lang.String params) throws java.lang.InstantiationException, java.lang.IllegalAccessException, java.io.IOException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.io.IOException
public java.lang.Object exec(Tuple input) throws java.io.IOException
EvalFunc
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<java.lang.Object>
input
- Schema of the inputpublic boolean needEndOfAllInputProcessing()
needEndOfAllInputProcessing
in class EvalFunc<java.lang.Object>
public void setEndOfAllInput(boolean endOfAllInput)
setEndOfAllInput
in class EvalFunc<java.lang.Object>
protected static java.lang.Class resolveFunc(java.lang.String funcName) throws java.io.IOException
java.io.IOException
protected static org.apache.hadoop.hive.ql.exec.MapredContext instantiateMapredContext()
public java.util.List<java.lang.String> getShipFiles()
EvalFunc
FuncUtils
for utility function to facilitate it
The default implementation returns null.getShipFiles
in class EvalFunc<java.lang.Object>
protected static java.lang.String getErrorMessage(java.lang.Class c)
Copyright © 2007-2017 The Apache Software Foundation