T
- type of record it producespublic class RegistryAvroDeserializationSchema<T> extends AvroDeserializationSchema<T>
SchemaCoder
.DeserializationSchema.InitializationContext
Modifier | Constructor and Description |
---|---|
protected |
RegistryAvroDeserializationSchema(Class<T> recordClazz,
org.apache.avro.Schema reader,
SchemaCoder.SchemaCoderProvider schemaCoderProvider)
Creates Avro deserialization schema that reads schema from input stream using provided
SchemaCoder . |
Modifier and Type | Method and Description |
---|---|
T |
deserialize(byte[] message)
Deserializes the byte message.
|
forGeneric, forSpecific, getProducedType, isEndOfStream
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
deserialize, open
protected RegistryAvroDeserializationSchema(Class<T> recordClazz, @Nullable org.apache.avro.Schema reader, SchemaCoder.SchemaCoderProvider schemaCoderProvider)
SchemaCoder
.recordClazz
- class to which deserialize. Should be either SpecificRecord
or
GenericRecord
.reader
- reader's Avro schema. Should be provided if recordClazz is GenericRecord
schemaCoderProvider
- schema provider that allows instantiation of SchemaCoder
that will be used for schema readingpublic T deserialize(byte[] message) throws IOException
DeserializationSchema
deserialize
in interface DeserializationSchema<T>
deserialize
in class AvroDeserializationSchema<T>
message
- The message, as a byte array.IOException
Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.