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

java.lang.Object
  extended by org.apache.hadoop.hive.serde2.objectinspector.LazyMapObjectInspector
All Implemented Interfaces:
MapObjectInspector, ObjectInspector

public class LazyMapObjectInspector
extends Object
implements MapObjectInspector

LazyMapObjectInspector works on struct data that is stored in LazyStruct. Always use the ObjectInspectorFactory 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
           
 
Constructor Summary
protected LazyMapObjectInspector(ObjectInspector mapKeyObjectInspector, ObjectInspector mapValueObjectInspector, byte itemSeparator, byte keyValueSeparator, org.apache.hadoop.io.Text nullSequence)
          Call ObjectInspectorFactory.getStandardListObjectInspector instead.
 
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
 Map<?,?> getMap(Object data)
          returns null for data = null.
 ObjectInspector getMapKeyObjectInspector()
           
 int getMapSize(Object data)
          returns -1 for NULL map.
 Object getMapValueElement(Object data, Object key)
           
 ObjectInspector getMapValueObjectInspector()
           
 String getTypeName()
          Returns the name of the data type that is inspected by this ObjectInspector.
 
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
Constructor Detail

LazyMapObjectInspector

protected LazyMapObjectInspector(ObjectInspector mapKeyObjectInspector,
                                 ObjectInspector mapValueObjectInspector,
                                 byte itemSeparator,
                                 byte keyValueSeparator,
                                 org.apache.hadoop.io.Text nullSequence)
Call ObjectInspectorFactory.getStandardListObjectInspector instead.

Method Detail

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

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

getMapKeyObjectInspector

public ObjectInspector getMapKeyObjectInspector()
Specified by:
getMapKeyObjectInspector in interface MapObjectInspector

getMapValueObjectInspector

public ObjectInspector getMapValueObjectInspector()
Specified by:
getMapValueObjectInspector in interface MapObjectInspector

getMapValueElement

public Object getMapValueElement(Object data,
                                 Object key)
Specified by:
getMapValueElement in interface MapObjectInspector

getMap

public Map<?,?> getMap(Object data)
Description copied from interface: MapObjectInspector
returns null for data = null.

Specified by:
getMap in interface MapObjectInspector

getMapSize

public int getMapSize(Object data)
Description copied from interface: MapObjectInspector
returns -1 for NULL map.

Specified by:
getMapSize in interface MapObjectInspector


Copyright © 2009 The Apache Software Foundation