Modifier and Type | Class and Description |
---|---|
static class |
HiveUDAF.Final |
static class |
HiveUDAF.Initial |
static class |
HiveUDAF.Intermediate |
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 |
---|
HiveUDAF(String funcName) |
HiveUDAF(String funcName,
String params) |
Modifier and Type | Method and Description |
---|---|
Object |
exec(Tuple input)
This callback method must be implemented by all subclasses.
|
protected static String |
getErrorMessage(Class c) |
String |
getFinal()
Get the final function.
|
String |
getInitial()
Get the initial function.
|
String |
getIntermed()
Get the intermediate function.
|
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, finish, getArgToFuncMapping, getCacheFiles, getInputSchema, getLogger, getPigLogger, getReporter, getReturnType, getSchemaName, getSchemaType, isAsynchronous, needEndOfAllInputProcessing, progress, setEndOfAllInput, setInputSchema, setPigLogger, setReporter, setUDFContextSignature, warn
public HiveUDAF(String funcName) throws IOException, InstantiationException, IllegalAccessException
public HiveUDAF(String funcName, String params) throws IOException, InstantiationException, IllegalAccessException
public String getInitial()
Algebraic
getInitial
in interface Algebraic
public String getIntermed()
Algebraic
getIntermed
in interface Algebraic
public String getFinal()
Algebraic
public Object exec(Tuple input) throws IOException
EvalFunc
exec
in class EvalFunc<Object>
input
- the Tuple to be processed.IOException
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 inputprotected static Class resolveFunc(String funcName) throws IOException
IOException
protected static org.apache.hadoop.hive.ql.exec.MapredContext instantiateMapredContext()
public List<String> getShipFiles()
EvalFunc
FuncUtils
for utility function to facilitate it
The default implementation returns null.getShipFiles
in class EvalFunc<Object>
Copyright © 2007-2012 The Apache Software Foundation