|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hive.serde2.objectinspector.StandardMapObjectInspector
public class StandardMapObjectInspector
StandardMapObjectInspector works on map data that is stored as a Java Map object. Note: the key object of the map must support equals and hashCode by itself. We also plan to have a GeneralMapObjectInspector which can work on map with key objects that does not support equals and hashCode. That will require us to store InspectableObject as the key, which will have overridden equals and hashCode methods. 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 |
Constructor Summary | |
---|---|
protected |
StandardMapObjectInspector(ObjectInspector mapKeyObjectInspector,
ObjectInspector mapValueObjectInspector)
Call ObjectInspectorFactory.getStandardMapObjectInspector 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 |
Constructor Detail |
---|
protected StandardMapObjectInspector(ObjectInspector mapKeyObjectInspector, ObjectInspector mapValueObjectInspector)
Method Detail |
---|
public ObjectInspector getMapKeyObjectInspector()
getMapKeyObjectInspector
in interface MapObjectInspector
public ObjectInspector getMapValueObjectInspector()
getMapValueObjectInspector
in interface MapObjectInspector
public Object getMapValueElement(Object data, Object key)
getMapValueElement
in interface MapObjectInspector
public int getMapSize(Object data)
MapObjectInspector
getMapSize
in interface MapObjectInspector
public Map<?,?> getMap(Object data)
MapObjectInspector
getMap
in interface MapObjectInspector
public final ObjectInspector.Category getCategory()
ObjectInspector
getCategory
in interface ObjectInspector
public String getTypeName()
ObjectInspector
getTypeName
in interface ObjectInspector
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |