org.apache.hadoop.hive.ql.udf.generic
Class GenericUDFInFile
java.lang.Object
org.apache.hadoop.hive.ql.udf.generic.GenericUDF
org.apache.hadoop.hive.ql.udf.generic.GenericUDFInFile
- All Implemented Interfaces:
- Closeable
public class GenericUDFInFile
- extends GenericUDF
IN_FILE(str, filename) returns true if 'str' appears in the file specified
by 'filename'. A string is considered to be in the file if it that string
appears as a line in the file.
If either argument is NULL then NULL is returned.
GenericUDFInFile
public GenericUDFInFile()
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.
getRequiredFiles
public String[] getRequiredFiles()
- Overrides:
getRequiredFiles
in class GenericUDF
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
load
public void load(InputStream is)
throws HiveException
- Load the file from an InputStream.
- Parameters:
is
- The InputStream contains the file data.
- Throws:
HiveException
getDisplayString
public String getDisplayString(String[] children)
- Description copied from class:
GenericUDF
- Get the String to be displayed in explain.
- Specified by:
getDisplayString
in class GenericUDF
Copyright © 2014 The Apache Software Foundation. All rights reserved.