org.apache.hadoop.hive.serde2.objectinspector
Interface ObjectInspector
- All Superinterfaces:
- Cloneable
- All Known Subinterfaces:
- BinaryObjectInspector, BooleanObjectInspector, ByteObjectInspector, ConstantObjectInspector, DoubleObjectInspector, FloatObjectInspector, IntObjectInspector, ListObjectInspector, LongObjectInspector, MapObjectInspector, PrimitiveObjectInspector, SettableBinaryObjectInspector, SettableBooleanObjectInspector, SettableByteObjectInspector, SettableDoubleObjectInspector, SettableFloatObjectInspector, SettableIntObjectInspector, SettableListObjectInspector, SettableLongObjectInspector, SettableMapObjectInspector, SettableShortObjectInspector, SettableStringObjectInspector, SettableTimestampObjectInspector, ShortObjectInspector, StringObjectInspector, TimestampObjectInspector, UnionObjectInspector, VoidObjectInspector
- All Known Implementing Classes:
- AbstractPrimitiveJavaObjectInspector, AbstractPrimitiveLazyObjectInspector, AbstractPrimitiveObjectInspector, AbstractPrimitiveWritableObjectInspector, DelegatedListObjectInspector, DelegatedMapObjectInspector, DelegatedStructObjectInspector, DelegatedUnionObjectInspector, JavaBinaryObjectInspector, JavaBooleanObjectInspector, JavaByteObjectInspector, JavaDoubleObjectInspector, JavaFloatObjectInspector, JavaIntObjectInspector, JavaLongObjectInspector, JavaShortObjectInspector, JavaStringObjectInspector, JavaTimestampObjectInspector, JavaVoidObjectInspector, LazyBinaryListObjectInspector, LazyBinaryMapObjectInspector, LazyBinaryObjectInspector, LazyBinaryStructObjectInspector, LazyBooleanObjectInspector, LazyByteObjectInspector, LazyDoubleObjectInspector, LazyFloatObjectInspector, LazyIntObjectInspector, LazyListObjectInspector, LazyLongObjectInspector, LazyMapObjectInspector, LazyShortObjectInspector, LazySimpleStructObjectInspector, LazyStringObjectInspector, LazyTimestampObjectInspector, LazyUnionObjectInspector, LazyVoidObjectInspector, MetadataListStructObjectInspector, ReflectionStructObjectInspector, SettableStructObjectInspector, StandardConstantListObjectInspector, StandardConstantMapObjectInspector, StandardListObjectInspector, StandardMapObjectInspector, StandardStructObjectInspector, StandardUnionObjectInspector, StructObjectInspector, SubStructObjectInspector, UnionStructObjectInspector, WritableBinaryObjectInspector, WritableBooleanObjectInspector, WritableByteObjectInspector, WritableConstantBinaryObjectInspector, WritableConstantBooleanObjectInspector, WritableConstantByteObjectInspector, WritableConstantDoubleObjectInspector, WritableConstantFloatObjectInspector, WritableConstantIntObjectInspector, WritableConstantLongObjectInspector, WritableConstantShortObjectInspector, WritableConstantStringObjectInspector, WritableConstantTimestampObjectInspector, WritableDoubleObjectInspector, WritableFloatObjectInspector, WritableIntObjectInspector, WritableLongObjectInspector, WritableShortObjectInspector, WritableStringObjectInspector, WritableTimestampObjectInspector, 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.
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. |
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