org.apache.hadoop.hive.serde2.objectinspector
Class ObjectInspectorFactory

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

public final class ObjectInspectorFactory
extends Object

ObjectInspectorFactory is the primary way to create new ObjectInspector instances. SerDe classes should call the static functions in this library to create an ObjectInspector to return to the caller of SerDe2.getObjectInspector(). 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.


Nested Class Summary
static class ObjectInspectorFactory.ObjectInspectorOptions
          ObjectInspectorOptions describes what ObjectInspector to use.
 
Method Summary
static org.apache.hadoop.hive.serde2.objectinspector.ColumnarStructObjectInspector getColumnarStructObjectInspector(List<String> structFieldNames, List<ObjectInspector> structFieldObjectInspectors)
           
static org.apache.hadoop.hive.serde2.objectinspector.ColumnarStructObjectInspector getColumnarStructObjectInspector(List<String> structFieldNames, List<ObjectInspector> structFieldObjectInspectors, List<String> structFieldComments)
           
static ObjectInspector getReflectionObjectInspector(Type t, ObjectInspectorFactory.ObjectInspectorOptions options)
           
static StandardConstantListObjectInspector getStandardConstantListObjectInspector(ObjectInspector listElementObjectInspector, List<?> constantValue)
           
static StandardConstantMapObjectInspector getStandardConstantMapObjectInspector(ObjectInspector mapKeyObjectInspector, ObjectInspector mapValueObjectInspector, Map<?,?> constantValue)
           
static StandardListObjectInspector getStandardListObjectInspector(ObjectInspector listElementObjectInspector)
           
static StandardMapObjectInspector getStandardMapObjectInspector(ObjectInspector mapKeyObjectInspector, ObjectInspector mapValueObjectInspector)
           
static StandardStructObjectInspector getStandardStructObjectInspector(List<String> structFieldNames, List<ObjectInspector> structFieldObjectInspectors)
           
static StandardStructObjectInspector getStandardStructObjectInspector(List<String> structFieldNames, List<ObjectInspector> structFieldObjectInspectors, List<String> structComments)
           
static StandardUnionObjectInspector getStandardUnionObjectInspector(List<ObjectInspector> unionObjectInspectors)
           
static UnionStructObjectInspector getUnionStructObjectInspector(List<StructObjectInspector> structObjectInspectors)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getReflectionObjectInspector

public static ObjectInspector getReflectionObjectInspector(Type t,
                                                           ObjectInspectorFactory.ObjectInspectorOptions options)

getStandardListObjectInspector

public static StandardListObjectInspector getStandardListObjectInspector(ObjectInspector listElementObjectInspector)

getStandardConstantListObjectInspector

public static StandardConstantListObjectInspector getStandardConstantListObjectInspector(ObjectInspector listElementObjectInspector,
                                                                                         List<?> constantValue)

getStandardMapObjectInspector

public static StandardMapObjectInspector getStandardMapObjectInspector(ObjectInspector mapKeyObjectInspector,
                                                                       ObjectInspector mapValueObjectInspector)

getStandardConstantMapObjectInspector

public static StandardConstantMapObjectInspector getStandardConstantMapObjectInspector(ObjectInspector mapKeyObjectInspector,
                                                                                       ObjectInspector mapValueObjectInspector,
                                                                                       Map<?,?> constantValue)

getStandardUnionObjectInspector

public static StandardUnionObjectInspector getStandardUnionObjectInspector(List<ObjectInspector> unionObjectInspectors)

getStandardStructObjectInspector

public static StandardStructObjectInspector getStandardStructObjectInspector(List<String> structFieldNames,
                                                                             List<ObjectInspector> structFieldObjectInspectors)

getStandardStructObjectInspector

public static StandardStructObjectInspector getStandardStructObjectInspector(List<String> structFieldNames,
                                                                             List<ObjectInspector> structFieldObjectInspectors,
                                                                             List<String> structComments)

getUnionStructObjectInspector

public static UnionStructObjectInspector getUnionStructObjectInspector(List<StructObjectInspector> structObjectInspectors)

getColumnarStructObjectInspector

public static org.apache.hadoop.hive.serde2.objectinspector.ColumnarStructObjectInspector getColumnarStructObjectInspector(List<String> structFieldNames,
                                                                                                                           List<ObjectInspector> structFieldObjectInspectors)

getColumnarStructObjectInspector

public static org.apache.hadoop.hive.serde2.objectinspector.ColumnarStructObjectInspector getColumnarStructObjectInspector(List<String> structFieldNames,
                                                                                                                           List<ObjectInspector> structFieldObjectInspectors,
                                                                                                                           List<String> structFieldComments)


Copyright © 2011 The Apache Software Foundation