|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hive.serde2.objectinspector.StructObjectInspector
org.apache.hadoop.hive.serde2.objectinspector.SettableStructObjectInspector
org.apache.hadoop.hive.serde2.objectinspector.ReflectionStructObjectInspector
public class ReflectionStructObjectInspector
ReflectionStructObjectInspector works on struct data that is stored as a native Java object. It will drill down into the Java class to get the fields and construct ObjectInspectors for the fields, if they are not specified. Always use the ObjectInspectorFactory to create new ObjectInspector objects, instead of directly creating an instance of this class.
Nested Class Summary | |
---|---|
static class |
ReflectionStructObjectInspector.MyField
MyField. |
Nested classes/interfaces inherited from interface org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector |
---|
ObjectInspector.Category |
Method Summary | |
---|---|
Object |
create()
Create a struct which is not null, but all its fields are null. |
List<? extends StructField> |
getAllStructFieldRefs()
Returns all the fields. |
ObjectInspector.Category |
getCategory()
An ObjectInspector must inherit from one of the following interfaces if getCategory() returns: PRIMITIVE: PrimitiveObjectInspector LIST: ListObjectInspector MAP: MapObjectInspector STRUCT: StructObjectInspector. |
Object |
getStructFieldData(Object data,
StructField fieldRef)
returns null for data = null. |
StructField |
getStructFieldRef(String fieldName)
Look up a field. |
List<Object> |
getStructFieldsDataAsList(Object data)
returns null for data = null. |
String |
getTypeName()
Returns the name of the data type that is inspected by this ObjectInspector. |
Object |
setStructFieldData(Object struct,
StructField field,
Object fieldValue)
Modify the value of a field. |
boolean |
shouldIgnoreField(String name)
|
Methods inherited from class org.apache.hadoop.hive.serde2.objectinspector.StructObjectInspector |
---|
toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public ObjectInspector.Category getCategory()
ObjectInspector
public String getTypeName()
ObjectInspector
public boolean shouldIgnoreField(String name)
public StructField getStructFieldRef(String fieldName)
StructObjectInspector
getStructFieldRef
in class StructObjectInspector
public List<? extends StructField> getAllStructFieldRefs()
StructObjectInspector
getAllStructFieldRefs
in class StructObjectInspector
public Object getStructFieldData(Object data, StructField fieldRef)
StructObjectInspector
getStructFieldData
in class StructObjectInspector
public List<Object> getStructFieldsDataAsList(Object data)
StructObjectInspector
getStructFieldsDataAsList
in class StructObjectInspector
public Object create()
SettableStructObjectInspector
create
in class SettableStructObjectInspector
public Object setStructFieldData(Object struct, StructField field, Object fieldValue)
SettableStructObjectInspector
setStructFieldData
in class SettableStructObjectInspector
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |