T
- type of record it producespublic class RegistryAvroDeserializationSchema<T> extends AvroDeserializationSchema<T>
SchemaCoder
.DeserializationSchema.InitializationContext
Constructor and Description |
---|
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.
|
boolean |
equals(Object o) |
int |
hashCode() |
forGeneric, forSpecific, getProducedType, isEndOfStream
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
deserialize, open
public 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(@Nullable byte[] message) throws IOException
DeserializationSchema
deserialize
in interface DeserializationSchema<T>
deserialize
in class AvroDeserializationSchema<T>
message
- The message, as a byte array.IOException
public boolean equals(Object o)
equals
in class AvroDeserializationSchema<T>
public int hashCode()
hashCode
in class AvroDeserializationSchema<T>
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.