public class Registry extends Object
Constructor and Description |
---|
Registry() |
Modifier and Type | Method and Description |
---|---|
void |
addToUDFLoaders(ClassLoader loader) |
void |
clear() |
void |
closeCUDFLoaders() |
Set<String> |
getCurrentFunctionNames() |
FunctionInfo |
getFunctionInfo(String functionName)
Looks up the function name in the registry.
|
Set<String> |
getFunctionNames(Pattern funcPattern)
Returns a set of registered function names.
|
Set<String> |
getFunctionNames(String funcPatternStr) |
void |
getFunctionSynonyms(String funcName,
FunctionInfo funcInfo,
Set<String> synonyms)
Adds to the set of synonyms of the supplied function.
|
GenericUDAFEvaluator |
getGenericUDAFEvaluator(String name,
List<ObjectInspector> argumentOIs,
boolean isDistinct,
boolean isAllColumns)
Get the GenericUDAF evaluator for the name and argumentClasses.
|
GenericUDAFResolver |
getGenericUDAFResolver(String functionName) |
GenericUDAFEvaluator |
getGenericWindowingEvaluator(String functionName,
List<ObjectInspector> argumentOIs,
boolean isDistinct,
boolean isAllColumns) |
WindowFunctionInfo |
getWindowFunctionInfo(String functionName) |
boolean |
isBuiltInFunc(Class<?> udfClass) |
FunctionInfo |
registerFunction(String functionName,
Class<?> udfClass,
FunctionInfo.FunctionResource... resources)
Registers the appropriate kind of temporary function based on a class's
type.
|
FunctionInfo |
registerGenericUDAF(String functionName,
GenericUDAFResolver genericUDAFResolver,
FunctionInfo.FunctionResource... resources) |
FunctionInfo |
registerGenericUDF(String functionName,
Class<? extends GenericUDF> genericUDFClass,
FunctionInfo.FunctionResource... resources) |
FunctionInfo |
registerGenericUDTF(String functionName,
Class<? extends GenericUDTF> genericUDTFClass,
FunctionInfo.FunctionResource... resources) |
FunctionInfo |
registerMacro(String macroName,
ExprNodeDesc body,
List<String> colNames,
List<TypeInfo> colTypes) |
FunctionInfo |
registerMacro(String macroName,
ExprNodeDesc body,
List<String> colNames,
List<TypeInfo> colTypes,
FunctionInfo.FunctionResource... resources) |
FunctionInfo |
registerPermanentFunction(String functionName,
String className,
boolean registerToSession,
FunctionInfo.FunctionResource... resources) |
FunctionInfo |
registerTableFunction(String functionName,
Class<? extends TableFunctionResolver> tFnCls,
FunctionInfo.FunctionResource... resources) |
FunctionInfo |
registerUDAF(String functionName,
Class<? extends UDAF> udafClass,
FunctionInfo.FunctionResource... resources) |
FunctionInfo |
registerUDF(String functionName,
Class<? extends UDF> UDFClass,
boolean isOperator,
FunctionInfo.FunctionResource... resources) |
FunctionInfo |
registerUDF(String functionName,
Class<? extends UDF> UDFClass,
boolean isOperator,
String displayName,
FunctionInfo.FunctionResource... resources) |
void |
removeFromUDFLoaders(ClassLoader loader) |
void |
setupPermissionsForUDFs(String whiteListStr,
String blackListStr)
Setup blocked flag for all builtin UDFs as per udf whitelist and blacklist
|
void |
unregisterFunction(String functionName) |
public FunctionInfo registerFunction(String functionName, Class<?> udfClass, FunctionInfo.FunctionResource... resources)
functionName
- name under which to register functionudfClass
- class implementing UD[A|T]Fpublic FunctionInfo registerUDF(String functionName, Class<? extends UDF> UDFClass, boolean isOperator, FunctionInfo.FunctionResource... resources)
public FunctionInfo registerUDF(String functionName, Class<? extends UDF> UDFClass, boolean isOperator, String displayName, FunctionInfo.FunctionResource... resources)
public FunctionInfo registerGenericUDF(String functionName, Class<? extends GenericUDF> genericUDFClass, FunctionInfo.FunctionResource... resources)
public FunctionInfo registerGenericUDTF(String functionName, Class<? extends GenericUDTF> genericUDTFClass, FunctionInfo.FunctionResource... resources)
public FunctionInfo registerGenericUDAF(String functionName, GenericUDAFResolver genericUDAFResolver, FunctionInfo.FunctionResource... resources)
public FunctionInfo registerUDAF(String functionName, Class<? extends UDAF> udafClass, FunctionInfo.FunctionResource... resources)
public FunctionInfo registerTableFunction(String functionName, Class<? extends TableFunctionResolver> tFnCls, FunctionInfo.FunctionResource... resources)
public FunctionInfo registerMacro(String macroName, ExprNodeDesc body, List<String> colNames, List<TypeInfo> colTypes)
public FunctionInfo registerMacro(String macroName, ExprNodeDesc body, List<String> colNames, List<TypeInfo> colTypes, FunctionInfo.FunctionResource... resources)
public FunctionInfo registerPermanentFunction(String functionName, String className, boolean registerToSession, FunctionInfo.FunctionResource... resources)
public FunctionInfo getFunctionInfo(String functionName) throws SemanticException
functionName
- SemanticException
public WindowFunctionInfo getWindowFunctionInfo(String functionName) throws SemanticException
SemanticException
public boolean isBuiltInFunc(Class<?> udfClass)
udfClass
- Function class.public Set<String> getFunctionNames(Pattern funcPattern)
funcPattern
- regular expression of the interested function namespublic void getFunctionSynonyms(String funcName, FunctionInfo funcInfo, Set<String> synonyms) throws SemanticException
funcName
- funcInfo
- synonyms
- SemanticException
public GenericUDAFEvaluator getGenericUDAFEvaluator(String name, List<ObjectInspector> argumentOIs, boolean isDistinct, boolean isAllColumns) throws SemanticException
name
- the name of the UDAFargumentOIs
- isDistinct
- isAllColumns
- SemanticException
public GenericUDAFEvaluator getGenericWindowingEvaluator(String functionName, List<ObjectInspector> argumentOIs, boolean isDistinct, boolean isAllColumns) throws SemanticException
SemanticException
public void unregisterFunction(String functionName) throws HiveException
HiveException
public GenericUDAFResolver getGenericUDAFResolver(String functionName) throws SemanticException
SemanticException
public void clear()
public void closeCUDFLoaders()
public void addToUDFLoaders(ClassLoader loader)
public void removeFromUDFLoaders(ClassLoader loader)
Copyright © 2017 The Apache Software Foundation. All rights reserved.