org.apache.hadoop.hive.serde2.objectinspector.primitive
Class PrimitiveObjectInspectorFactory

java.lang.Object
  extended by org.apache.hadoop.hive.serde2.objectinspector.primitive.PrimitiveObjectInspectorFactory

public class PrimitiveObjectInspectorFactory
extends Object

PrimitiveObjectInspectorFactory is the primary way to create new PrimitiveObjectInspector instances. The reason of having caches here is that ObjectInspector is because ObjectInspectors do not have an internal state - so ObjectInspectors with the same construction parameters should result in exactly the same ObjectInspector.


Field Summary
static JavaBooleanObjectInspector javaBooleanObjectInspector
           
static JavaByteObjectInspector javaByteObjectInspector
           
static JavaDoubleObjectInspector javaDoubleObjectInspector
           
static JavaFloatObjectInspector javaFloatObjectInspector
           
static JavaIntObjectInspector javaIntObjectInspector
           
static JavaLongObjectInspector javaLongObjectInspector
           
static JavaShortObjectInspector javaShortObjectInspector
           
static JavaStringObjectInspector javaStringObjectInspector
           
static JavaVoidObjectInspector javaVoidObjectInspector
           
static WritableBooleanObjectInspector writableBooleanObjectInspector
           
static WritableByteObjectInspector writableByteObjectInspector
           
static WritableDoubleObjectInspector writableDoubleObjectInspector
           
static WritableFloatObjectInspector writableFloatObjectInspector
           
static WritableIntObjectInspector writableIntObjectInspector
           
static WritableLongObjectInspector writableLongObjectInspector
           
static WritableShortObjectInspector writableShortObjectInspector
           
static WritableStringObjectInspector writableStringObjectInspector
           
static WritableVoidObjectInspector writableVoidObjectInspector
           
 
Constructor Summary
PrimitiveObjectInspectorFactory()
           
 
Method Summary
static AbstractPrimitiveJavaObjectInspector getPrimitiveJavaObjectInspector(PrimitiveObjectInspector.PrimitiveCategory primitiveCategory)
          Returns the PrimitiveJavaObjectInspector for the PrimitiveCategory.
static PrimitiveObjectInspector getPrimitiveObjectInspectorFromClass(Class<?> c)
          Returns an ObjectInspector for a primitive Class.
static AbstractPrimitiveWritableObjectInspector getPrimitiveWritableObjectInspector(PrimitiveObjectInspector.PrimitiveCategory primitiveCategory)
          Returns the PrimitiveWritableObjectInspector for the PrimitiveCategory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

javaBooleanObjectInspector

public static final JavaBooleanObjectInspector javaBooleanObjectInspector

javaByteObjectInspector

public static final JavaByteObjectInspector javaByteObjectInspector

javaShortObjectInspector

public static final JavaShortObjectInspector javaShortObjectInspector

javaIntObjectInspector

public static final JavaIntObjectInspector javaIntObjectInspector

javaLongObjectInspector

public static final JavaLongObjectInspector javaLongObjectInspector

javaFloatObjectInspector

public static final JavaFloatObjectInspector javaFloatObjectInspector

javaDoubleObjectInspector

public static final JavaDoubleObjectInspector javaDoubleObjectInspector

javaStringObjectInspector

public static final JavaStringObjectInspector javaStringObjectInspector

javaVoidObjectInspector

public static final JavaVoidObjectInspector javaVoidObjectInspector

writableBooleanObjectInspector

public static final WritableBooleanObjectInspector writableBooleanObjectInspector

writableByteObjectInspector

public static final WritableByteObjectInspector writableByteObjectInspector

writableShortObjectInspector

public static final WritableShortObjectInspector writableShortObjectInspector

writableIntObjectInspector

public static final WritableIntObjectInspector writableIntObjectInspector

writableLongObjectInspector

public static final WritableLongObjectInspector writableLongObjectInspector

writableFloatObjectInspector

public static final WritableFloatObjectInspector writableFloatObjectInspector

writableDoubleObjectInspector

public static final WritableDoubleObjectInspector writableDoubleObjectInspector

writableStringObjectInspector

public static final WritableStringObjectInspector writableStringObjectInspector

writableVoidObjectInspector

public static final WritableVoidObjectInspector writableVoidObjectInspector
Constructor Detail

PrimitiveObjectInspectorFactory

public PrimitiveObjectInspectorFactory()
Method Detail

getPrimitiveWritableObjectInspector

public static AbstractPrimitiveWritableObjectInspector getPrimitiveWritableObjectInspector(PrimitiveObjectInspector.PrimitiveCategory primitiveCategory)
Returns the PrimitiveWritableObjectInspector for the PrimitiveCategory.

Parameters:
primitiveCategory -

getPrimitiveJavaObjectInspector

public static AbstractPrimitiveJavaObjectInspector getPrimitiveJavaObjectInspector(PrimitiveObjectInspector.PrimitiveCategory primitiveCategory)
Returns the PrimitiveJavaObjectInspector for the PrimitiveCategory.

Parameters:
primitiveCategory -

getPrimitiveObjectInspectorFromClass

public static PrimitiveObjectInspector getPrimitiveObjectInspectorFromClass(Class<?> c)
Returns an ObjectInspector for a primitive Class. The Class can be a Hive Writable class, or a Java Primitive Class. A runtimeException will be thrown if the class is not recognized as a primitive type by Hive.



Copyright © 2009 The Apache Software Foundation