public class ProtobufData extends GenericData
GenericData.Array<T>, GenericData.EnumSymbol, GenericData.Fixed, GenericData.Record, GenericData.StringType
STRING_PROP, STRING_TYPE_STRING
Modifier | Constructor and Description |
---|---|
protected |
ProtobufData() |
compare, compare, createDatumReader, createEnum, createFixed, createFixed, deepCopy, getClassLoader, getDefaultValue, getEnumSchema, getFixedSchema, getSchemaName, hashCode, hashCodeAdd, induce, instanceOf, isBoolean, isDouble, isEnum, isFixed, isFloat, isInteger, isLong, isMap, isString, resolveUnion, setStringType, toString, toString, validate
public static ProtobufData get()
public DatumReader createDatumReader(Schema schema)
GenericData
DatumReader
for this kind of data.createDatumReader
in class GenericData
public DatumWriter createDatumWriter(Schema schema)
GenericData
DatumWriter
for this kind of data.createDatumWriter
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 o, 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
public Object newRecord(Object old, Schema schema)
GenericData
GenericData.Record
.newRecord
in class GenericData
protected boolean isArray(Object datum)
GenericData
GenericData.instanceOf(org.apache.avro.Schema, java.lang.Object)
.isArray
in class GenericData
protected boolean isBytes(Object datum)
GenericData
GenericData.instanceOf(org.apache.avro.Schema, java.lang.Object)
.isBytes
in class GenericData
protected Schema getRecordSchema(Object record)
GenericData
getRecordSchema
in class GenericData
Copyright © 2009-2014 The Apache Software Foundation. All Rights Reserved.