org.apache.hadoop.hive.ql.udf.generic
Class AbstractGenericUDFEWAHBitmapBop

java.lang.Object
  extended by org.apache.hadoop.hive.ql.udf.generic.GenericUDF
      extended by org.apache.hadoop.hive.ql.udf.generic.AbstractGenericUDFEWAHBitmapBop
All Implemented Interfaces:
Closeable
Direct Known Subclasses:
GenericUDFEWAHBitmapAnd, GenericUDFEWAHBitmapOr

public abstract class AbstractGenericUDFEWAHBitmapBop
extends GenericUDF

An abstract class for a UDF that performs a binary operation between two EWAH-compressed bitmaps. For example: Bitmap OR and AND operations between two EWAH-compressed bitmaps.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.hadoop.hive.ql.udf.generic.GenericUDF
GenericUDF.DeferredJavaObject, GenericUDF.DeferredObject
 
Field Summary
protected  ArrayList<Object> ret
           
 
Method Summary
protected abstract  javaewah.EWAHCompressedBitmap bitmapBop(javaewah.EWAHCompressedBitmap bitmap1, javaewah.EWAHCompressedBitmap bitmap2)
           
protected  List<LongWritable> bitmapToWordArray(javaewah.EWAHCompressedBitmap bitmap)
           
 Object evaluate(GenericUDF.DeferredObject[] arguments)
          Evaluate the GenericUDF with the arguments.
 String getDisplayString(String[] children)
          Get the String to be displayed in explain.
 ObjectInspector initialize(ObjectInspector[] arguments)
          Initialize this GenericUDF.
protected  javaewah.EWAHCompressedBitmap wordArrayToBitmap(Object b)
           
 
Methods inherited from class org.apache.hadoop.hive.ql.udf.generic.GenericUDF
close, configure, getRequiredFiles, getRequiredJars, initializeAndFoldConstants
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ret

protected final ArrayList<Object> ret
Method Detail

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.

bitmapBop

protected abstract javaewah.EWAHCompressedBitmap bitmapBop(javaewah.EWAHCompressedBitmap bitmap1,
                                                           javaewah.EWAHCompressedBitmap bitmap2)

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

wordArrayToBitmap

protected javaewah.EWAHCompressedBitmap wordArrayToBitmap(Object b)

bitmapToWordArray

protected List<LongWritable> bitmapToWordArray(javaewah.EWAHCompressedBitmap bitmap)

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 © 2012 The Apache Software Foundation