|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hive.ql.exec.UDF
public class UDF
A User-defined function (UDF) for the use with Hive. New UDF classes need to inherit from this UDF class. Required for all UDF classes: 1. Implement one or more methods named "evaluate" which will be called by Hive. The following are some examples: public int evaluate(); public int evaluate(int a); public double evaluate(int a, double b); public String evaluate(String a, int b, String c); "evaluate" should never be a void method. However it can return "null" if needed.
Constructor Summary | |
---|---|
|
UDF()
The constructor. |
protected |
UDF(UDFMethodResolver rslv)
The constructor with user-provided UDFMethodResolver. |
Method Summary | |
---|---|
String[] |
getRequiredFiles()
|
String[] |
getRequiredJars()
These can be overriden to provide the same functionality as the correspondingly named methods in GenericUDF. |
UDFMethodResolver |
getResolver()
Get the method resolver. |
void |
setResolver(UDFMethodResolver rslv)
Sets the resolver. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UDF()
protected UDF(UDFMethodResolver rslv)
Method Detail |
---|
public void setResolver(UDFMethodResolver rslv)
rslv
- The method resolver to use for method resolution.public UDFMethodResolver getResolver()
public String[] getRequiredJars()
public String[] getRequiredFiles()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |