Package org.apache.avro.thrift
Class ThriftDatumReader<T>
java.lang.Object
org.apache.avro.generic.GenericDatumReader<T>
org.apache.avro.thrift.ThriftDatumReader<T>
- All Implemented Interfaces:
DatumReader<T>
DatumReader
for generated Thrift
classes.-
Constructor Summary
ModifierConstructorDescriptionThriftDatumReader
(Class<T> c) ThriftDatumReader
(Schema schema) Construct where the writer's and reader's schemas are the same.ThriftDatumReader
(Schema writer, Schema reader) Construct given writer's and reader's schema.protected
ThriftDatumReader
(Schema writer, Schema reader, ThriftData data) -
Method Summary
Methods inherited from class org.apache.avro.generic.GenericDatumReader
addToArray, addToMap, convert, createBytes, createFixed, createFixed, createString, findStringClass, getData, getExpected, getResolver, getSchema, newInstanceFromString, newMap, newRecord, peekArray, read, read, readArray, readBytes, readBytes, readEnum, readField, readFixed, readMap, readMapKey, readRecord, readString, readString, readWithConversion, readWithoutConversion, setExpected, setSchema, skip
-
Constructor Details
-
ThriftDatumReader
public ThriftDatumReader() -
ThriftDatumReader
-
ThriftDatumReader
Construct where the writer's and reader's schemas are the same. -
ThriftDatumReader
Construct given writer's and reader's schema. -
ThriftDatumReader
-
-
Method Details
-
createEnum
Description copied from class:GenericDatumReader
Called to create an enum value. May be overridden for alternate enum representations. By default, returns a GenericEnumSymbol.- Overrides:
createEnum
in classGenericDatumReader<T>
-
readInt
Description copied from class:GenericDatumReader
Called to read integers. Subclasses may override to use a different integer representation. By default, this callsDecoder.readInt()
.- Overrides:
readInt
in classGenericDatumReader<T>
- Throws:
IOException
-
newArray
Description copied from class:GenericDatumReader
Called to create new array instances. Subclasses may override to use a different array implementation. By default, this returns aGenericData.Array
.- Overrides:
newArray
in classGenericDatumReader<T>
-