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

All Superinterfaces:
Cloneable
All Known Subinterfaces:
BooleanObjectInspector, ByteObjectInspector, DoubleObjectInspector, FloatObjectInspector, IntObjectInspector, ListObjectInspector, LongObjectInspector, MapObjectInspector, PrimitiveObjectInspector, SettableBooleanObjectInspector, SettableByteObjectInspector, SettableDoubleObjectInspector, SettableFloatObjectInspector, SettableIntObjectInspector, SettableListObjectInspector, SettableLongObjectInspector, SettableMapObjectInspector, SettableShortObjectInspector, SettableStringObjectInspector, ShortObjectInspector, StringObjectInspector, UnionObjectInspector, VoidObjectInspector
All Known Implementing Classes:
AbstractPrimitiveJavaObjectInspector, AbstractPrimitiveLazyObjectInspector, AbstractPrimitiveObjectInspector, AbstractPrimitiveWritableObjectInspector, JavaBooleanObjectInspector, JavaByteObjectInspector, JavaDoubleObjectInspector, JavaFloatObjectInspector, JavaIntObjectInspector, JavaLongObjectInspector, JavaShortObjectInspector, JavaStringObjectInspector, JavaVoidObjectInspector, LazyBinaryListObjectInspector, LazyBinaryMapObjectInspector, LazyBinaryStructObjectInspector, LazyBooleanObjectInspector, LazyByteObjectInspector, LazyDoubleObjectInspector, LazyFloatObjectInspector, LazyIntObjectInspector, LazyListObjectInspector, LazyLongObjectInspector, LazyMapObjectInspector, LazyShortObjectInspector, LazySimpleStructObjectInspector, LazyStringObjectInspector, LazyUnionObjectInspector, LazyVoidObjectInspector, MetadataListStructObjectInspector, ReflectionStructObjectInspector, SettableStructObjectInspector, StandardListObjectInspector, StandardMapObjectInspector, StandardStructObjectInspector, StandardUnionObjectInspector, StructObjectInspector, SubStructObjectInspector, UnionStructObjectInspector, WritableBooleanObjectInspector, WritableByteObjectInspector, WritableDoubleObjectInspector, WritableFloatObjectInspector, WritableIntObjectInspector, WritableLongObjectInspector, WritableShortObjectInspector, WritableStringObjectInspector, WritableVoidObjectInspector

public interface ObjectInspector
extends Cloneable

ObjectInspector helps us to look into the internal structure of a complex object. A (probably configured) ObjectInspector instance stands for a specific type and a specific way to store the data of that type in the memory. For native java Object, we can directly access the internal structure through member fields and methods. ObjectInspector is a way to delegate that functionality away from the Object, so that we have more control on the behavior of those actions. An efficient implementation of ObjectInspector should rely on factory, so that we can make sure the same ObjectInspector only has one instance. That also makes sure hashCode() and equals() methods of java.lang.Object directly works for ObjectInspector as well.


Nested Class Summary
static class ObjectInspector.Category
          Category.
 
Method Summary
 ObjectInspector.Category getCategory()
          An ObjectInspector must inherit from one of the following interfaces if getCategory() returns: PRIMITIVE: PrimitiveObjectInspector LIST: ListObjectInspector MAP: MapObjectInspector STRUCT: StructObjectInspector.
 String getTypeName()
          Returns the name of the data type that is inspected by this ObjectInspector.
 

Method Detail

getTypeName

String getTypeName()
Returns the name of the data type that is inspected by this ObjectInspector. This is used to display the type information to the user. For primitive types, the type name is standardized. For other types, the type name can be something like "list", "map", java class names, or user-defined type names similar to typedef.


getCategory

ObjectInspector.Category getCategory()
An ObjectInspector must inherit from one of the following interfaces if getCategory() returns: PRIMITIVE: PrimitiveObjectInspector LIST: ListObjectInspector MAP: MapObjectInspector STRUCT: StructObjectInspector.



Copyright © 2011 The Apache Software Foundation