org.apache.hadoop.hive.serde2.objectinspector
Enum ObjectInspectorFactory.ObjectInspectorOptions

java.lang.Object
  extended by java.lang.Enum<ObjectInspectorFactory.ObjectInspectorOptions>
      extended by org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorFactory.ObjectInspectorOptions
All Implemented Interfaces:
Serializable, Comparable<ObjectInspectorFactory.ObjectInspectorOptions>
Enclosing class:
ObjectInspectorFactory

public static enum ObjectInspectorFactory.ObjectInspectorOptions
extends Enum<ObjectInspectorFactory.ObjectInspectorOptions>

ObjectInspectorOptions describes what ObjectInspector to use. JAVA is to use pure JAVA reflection. THRIFT is to use JAVA reflection and filter out __isset fields, PROTOCOL_BUFFERS filters out has*. New ObjectInspectorOptions can be added here when available. We choose to use a single HashMap objectInspectorCache to cache all situations for efficiency and code simplicity. And we don't expect a case that a user need to create 2 or more different types of ObjectInspectors for the same Java type.


Enum Constant Summary
JAVA
           
PROTOCOL_BUFFERS
           
THRIFT
           
 
Method Summary
static ObjectInspectorFactory.ObjectInspectorOptions valueOf(String name)
          Returns the enum constant of this type with the specified name.
static ObjectInspectorFactory.ObjectInspectorOptions[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

JAVA

public static final ObjectInspectorFactory.ObjectInspectorOptions JAVA

THRIFT

public static final ObjectInspectorFactory.ObjectInspectorOptions THRIFT

PROTOCOL_BUFFERS

public static final ObjectInspectorFactory.ObjectInspectorOptions PROTOCOL_BUFFERS
Method Detail

values

public static ObjectInspectorFactory.ObjectInspectorOptions[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (ObjectInspectorFactory.ObjectInspectorOptions c : ObjectInspectorFactory.ObjectInspectorOptions.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static ObjectInspectorFactory.ObjectInspectorOptions valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null


Copyright © 2011 The Apache Software Foundation