org.apache.hadoop.hive.ql.udf.generic
Class GenericUDFReflect2
java.lang.Object
org.apache.hadoop.hive.ql.udf.generic.GenericUDF
org.apache.hadoop.hive.ql.udf.generic.AbstractGenericUDFReflect
org.apache.hadoop.hive.ql.udf.generic.GenericUDFReflect2
- All Implemented Interfaces:
- Closeable
public class GenericUDFReflect2
- extends AbstractGenericUDFReflect
A simple generic udf to call java functions via reflection.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GenericUDFReflect2
public GenericUDFReflect2()
initialize
public ObjectInspector initialize(ObjectInspector[] arguments)
throws UDFArgumentException
- Description copied from class:
GenericUDF
- Initialize this GenericUDF. This will be called once and only once per
GenericUDF instance.
- Specified by:
initialize
in class GenericUDF
- Parameters:
arguments
- The ObjectInspector for the arguments
- Returns:
- The ObjectInspector for the return value
- Throws:
UDFArgumentException
- Thrown when arguments have wrong types, wrong length, etc.
evaluate
public Object evaluate(GenericUDF.DeferredObject[] arguments)
throws HiveException
- Description copied from class:
GenericUDF
- Evaluate the GenericUDF with the arguments.
- Specified by:
evaluate
in class GenericUDF
- Parameters:
arguments
- The arguments as DeferedObject, use DeferedObject.get() to get the
actual argument Object. The Objects can be inspected by the
ObjectInspectors passed in the initialize call.
- Returns:
- The
- Throws:
HiveException
functionName
protected String functionName()
- Specified by:
functionName
in class AbstractGenericUDFReflect
Copyright © 2012 The Apache Software Foundation