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

java.lang.Object
  extended by org.apache.hadoop.hive.ql.udf.generic.GenericUDFUtils

public class GenericUDFUtils
extends Object

Util functions for GenericUDF classes.


Nested Class Summary
static class GenericUDFUtils.PrimitiveConversionHelper
          Convert primitive parameters between Java and Writable when needed.
static class GenericUDFUtils.ReturnObjectInspectorResolver
          This class helps to find the return ObjectInspector for a GenericUDF.
 
Constructor Summary
GenericUDFUtils()
           
 
Method Summary
static int findText(org.apache.hadoop.io.Text text, org.apache.hadoop.io.Text subtext, int start)
          Finds any occurence of subtext from text in the backing buffer, for avoiding string encoding and decoding.
static String getOrdinal(int i)
          Return an ordinal from an integer.
static boolean isUtfStartByte(byte b)
          Checks if b is the first byte of a UTF-8 character.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenericUDFUtils

public GenericUDFUtils()
Method Detail

isUtfStartByte

public static boolean isUtfStartByte(byte b)
Checks if b is the first byte of a UTF-8 character.


getOrdinal

public static String getOrdinal(int i)
Return an ordinal from an integer.


findText

public static int findText(org.apache.hadoop.io.Text text,
                           org.apache.hadoop.io.Text subtext,
                           int start)
Finds any occurence of subtext from text in the backing buffer, for avoiding string encoding and decoding. Shamelessly copy from Text.find(String, int).



Copyright © 2009 The Apache Software Foundation