org.apache.hadoop.hive.serde2.objectinspector
Interface PrimitiveObjectInspector

All Superinterfaces:
Cloneable, ObjectInspector
All Known Subinterfaces:
BooleanObjectInspector, ByteObjectInspector, DoubleObjectInspector, FloatObjectInspector, IntObjectInspector, LongObjectInspector, SettableBooleanObjectInspector, SettableByteObjectInspector, SettableDoubleObjectInspector, SettableFloatObjectInspector, SettableIntObjectInspector, SettableLongObjectInspector, SettableShortObjectInspector, SettableStringObjectInspector, ShortObjectInspector, StringObjectInspector, VoidObjectInspector
All Known Implementing Classes:
AbstractPrimitiveJavaObjectInspector, AbstractPrimitiveLazyObjectInspector, AbstractPrimitiveObjectInspector, AbstractPrimitiveWritableObjectInspector, JavaBooleanObjectInspector, JavaByteObjectInspector, JavaDoubleObjectInspector, JavaFloatObjectInspector, JavaIntObjectInspector, JavaLongObjectInspector, JavaShortObjectInspector, JavaStringObjectInspector, JavaVoidObjectInspector, LazyBooleanObjectInspector, LazyByteObjectInspector, LazyDoubleObjectInspector, LazyFloatObjectInspector, LazyIntObjectInspector, LazyLongObjectInspector, LazyShortObjectInspector, LazyStringObjectInspector, LazyVoidObjectInspector, WritableBooleanObjectInspector, WritableByteObjectInspector, WritableDoubleObjectInspector, WritableFloatObjectInspector, WritableIntObjectInspector, WritableLongObjectInspector, WritableShortObjectInspector, WritableStringObjectInspector, WritableVoidObjectInspector

public interface PrimitiveObjectInspector
extends ObjectInspector

PrimitiveObjectInspector.


Nested Class Summary
static class PrimitiveObjectInspector.PrimitiveCategory
          The primitive types supported by Hive.
 
Nested classes/interfaces inherited from interface org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector
ObjectInspector.Category
 
Method Summary
 Object copyObject(Object o)
          Get a copy of the Object in the same class, so the return value can be stored independently of the parameter.
 Class<?> getJavaPrimitiveClass()
          Get the Java Primitive class which is the return type of getJavaPrimitiveObject().
 PrimitiveObjectInspector.PrimitiveCategory getPrimitiveCategory()
          Get the primitive category of the PrimitiveObjectInspector.
 Object getPrimitiveJavaObject(Object o)
          Get the Java Primitive object.
 Class<?> getPrimitiveWritableClass()
          Get the Primitive Writable class which is the return type of getPrimitiveWritableObject() and copyToPrimitiveWritableObject().
 Object getPrimitiveWritableObject(Object o)
          Return the data in an instance of primitive writable Object.
 boolean preferWritable()
          Whether the ObjectInspector prefers to return a Primitive Writable Object instead of a Primitive Java Object.
 
Methods inherited from interface org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector
getCategory, getTypeName
 

Method Detail

getPrimitiveCategory

PrimitiveObjectInspector.PrimitiveCategory getPrimitiveCategory()
Get the primitive category of the PrimitiveObjectInspector.


getPrimitiveWritableClass

Class<?> getPrimitiveWritableClass()
Get the Primitive Writable class which is the return type of getPrimitiveWritableObject() and copyToPrimitiveWritableObject().


getPrimitiveWritableObject

Object getPrimitiveWritableObject(Object o)
Return the data in an instance of primitive writable Object. If the Object is already a primitive writable Object, just return o.


getJavaPrimitiveClass

Class<?> getJavaPrimitiveClass()
Get the Java Primitive class which is the return type of getJavaPrimitiveObject().


getPrimitiveJavaObject

Object getPrimitiveJavaObject(Object o)
Get the Java Primitive object.


copyObject

Object copyObject(Object o)
Get a copy of the Object in the same class, so the return value can be stored independently of the parameter. If the Object is a Primitive Java Object, we just return the parameter since Primitive Java Object is immutable.


preferWritable

boolean preferWritable()
Whether the ObjectInspector prefers to return a Primitive Writable Object instead of a Primitive Java Object. This can be useful for determining the most efficient way to getting data out of the Object.



Copyright © 2011 The Apache Software Foundation