public class ThriftData extends GenericData
GenericData.Array<T>, GenericData.EnumSymbol, GenericData.Fixed, GenericData.Record, GenericData.StringType
STRING_PROP, STRING_TYPE_STRING
Modifier | Constructor and Description |
---|---|
protected |
ThriftData() |
compare, compare, createFixed, createFixed, deepCopy, getFixedSchema, getSchemaName, hashCode, hashCodeAdd, induce, instanceOf, isArray, isBoolean, isDouble, isFixed, isFloat, isInteger, isLong, isMap, isString, resolveUnion, setStringType, toString, toString, validate
public static ThriftData get()
public DatumReader createDatumReader(Schema schema)
GenericData
DatumReader
for this kind of data.createDatumReader
in class GenericData
public void setField(Object r, String n, int pos, Object o)
GenericData
GenericDatumReader.readRecord(java.lang.Object, org.apache.avro.Schema, org.apache.avro.io.ResolvingDecoder)
to set a record fields
value to a record instance. The default implementation is for IndexedRecord
.setField
in class GenericData
public Object getField(Object r, String name, int pos)
GenericData
GenericDatumReader.readRecord(java.lang.Object, org.apache.avro.Schema, org.apache.avro.io.ResolvingDecoder)
to retrieve a record
field value from a reused instance. The default implementation is for
IndexedRecord
.getField
in class GenericData
protected void setField(Object r, String n, int pos, Object v, Object state)
GenericData
GenericData.setField(java.lang.Object, java.lang.String, int, java.lang.Object)
that has state.setField
in class GenericData
protected Object getField(Object record, String name, int pos, Object state)
GenericData
GenericData.getField(java.lang.Object, java.lang.String, int)
that has state.getField
in class GenericData
protected Object getRecordState(Object r, Schema s)
GenericData
GenericData.getField(Object,String,int,Object)
and GenericData.setField(Object,String,int,Object,Object)
on the same record.getRecordState
in class GenericData
protected boolean isRecord(Object datum)
GenericData
GenericData.instanceOf(org.apache.avro.Schema, java.lang.Object)
.isRecord
in class GenericData
protected boolean isEnum(Object datum)
GenericData
GenericData.instanceOf(org.apache.avro.Schema, java.lang.Object)
.isEnum
in class GenericData
protected Schema getEnumSchema(Object datum)
GenericData
getEnumSchema
in class GenericData
protected boolean isBytes(Object datum)
GenericData
GenericData.instanceOf(org.apache.avro.Schema, java.lang.Object)
.isBytes
in class GenericData
public Object newRecord(Object old, Schema schema)
GenericData
GenericData.Record
.newRecord
in class GenericData
protected Schema getRecordSchema(Object record)
GenericData
getRecordSchema
in class GenericData
Copyright © 2009-2012 The Apache Software Foundation. All Rights Reserved.