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

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

public class DelegatedMapObjectInspector
extends Object
implements MapObjectInspector


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector
ObjectInspector.Category
 
Constructor Summary
DelegatedMapObjectInspector(MapObjectInspector delegate)
           
 
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.
 void reset(MapObjectInspector current)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DelegatedMapObjectInspector

public DelegatedMapObjectInspector(MapObjectInspector delegate)
Method Detail

reset

public void reset(MapObjectInspector current)

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. Note: This method should not return a Map object that is reused by the same MapObjectInspector, because it's possible that the same MapObjectInspector will be used in multiple places in the code. However it's OK if the Map object is part of the Object data.

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

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

getCategory

public 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


Copyright © 2012 The Apache Software Foundation