org.apache.hadoop.hive.serde2.lazy.objectinspector
Class LazyUnionObjectInspector

java.lang.Object
  extended by org.apache.hadoop.hive.serde2.lazy.objectinspector.LazyUnionObjectInspector
All Implemented Interfaces:
Cloneable, ObjectInspector, UnionObjectInspector

public class LazyUnionObjectInspector
extends Object
implements UnionObjectInspector

LazyUnionObjectInspector works on union data that is stored in LazyUnion. Always use the LazyObjectInspectorFactory to create new ObjectInspector objects, instead of directly creating an instance of this class.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector
ObjectInspector.Category
 
Field Summary
static org.apache.commons.logging.Log LOG
           
protected  List<ObjectInspector> ois
           
 
Constructor Summary
protected LazyUnionObjectInspector(List<ObjectInspector> ois, byte separator, org.apache.hadoop.io.Text nullSequence)
           
protected LazyUnionObjectInspector(List<ObjectInspector> ois, byte separator, org.apache.hadoop.io.Text nullSequence, boolean escaped, byte escapeChar)
           
 
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.
 byte getEscapeChar()
           
 Object getField(Object data)
          Return the field based on the tag associated with the Object.
 org.apache.hadoop.io.Text getNullSequence()
           
 List<ObjectInspector> getObjectInspectors()
          Returns the array of ObjectInspectors that are for each of the tags.
 byte getSeparator()
           
 byte getTag(Object data)
          Return the tag of the object.
 String getTypeName()
          Returns the name of the data type that is inspected by this ObjectInspector.
protected  void init(List<ObjectInspector> ois, byte separator, org.apache.hadoop.io.Text nullSequence)
           
protected  void init(List<ObjectInspector> ois, byte separator, org.apache.hadoop.io.Text nullSequence, boolean escaped, byte escapeChar)
           
 boolean isEscaped()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

public static final org.apache.commons.logging.Log LOG

ois

protected List<ObjectInspector> ois
Constructor Detail

LazyUnionObjectInspector

protected LazyUnionObjectInspector(List<ObjectInspector> ois,
                                   byte separator,
                                   org.apache.hadoop.io.Text nullSequence,
                                   boolean escaped,
                                   byte escapeChar)

LazyUnionObjectInspector

protected LazyUnionObjectInspector(List<ObjectInspector> ois,
                                   byte separator,
                                   org.apache.hadoop.io.Text nullSequence)
Method Detail

getTypeName

public String getTypeName()
Description copied from interface: ObjectInspector
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.

Specified by:
getTypeName in interface ObjectInspector

init

protected void init(List<ObjectInspector> ois,
                    byte separator,
                    org.apache.hadoop.io.Text nullSequence,
                    boolean escaped,
                    byte escapeChar)

init

protected void init(List<ObjectInspector> ois,
                    byte separator,
                    org.apache.hadoop.io.Text nullSequence)

getCategory

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

Specified by:
getCategory in interface ObjectInspector

getSeparator

public byte getSeparator()

getNullSequence

public org.apache.hadoop.io.Text getNullSequence()

isEscaped

public boolean isEscaped()

getEscapeChar

public byte getEscapeChar()

getField

public Object getField(Object data)
Description copied from interface: UnionObjectInspector
Return the field based on the tag associated with the Object.

Specified by:
getField in interface UnionObjectInspector

getObjectInspectors

public List<ObjectInspector> getObjectInspectors()
Description copied from interface: UnionObjectInspector
Returns the array of ObjectInspectors that are for each of the tags.

Specified by:
getObjectInspectors in interface UnionObjectInspector

getTag

public byte getTag(Object data)
Description copied from interface: UnionObjectInspector
Return the tag of the object.

Specified by:
getTag in interface UnionObjectInspector


Copyright © 2011 The Apache Software Foundation