T - type of record it producespublic class RegistryAvroDeserializationSchema<T> extends AvroDeserializationSchema<T>
SchemaCoder.| 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. |
RegistryAvroDeserializationSchema(Class<T> recordClazz,
org.apache.avro.Schema reader,
SchemaCoder.SchemaCoderProvider schemaCoderProvider,
AvroFormatOptions.AvroEncoding encoding)
Creates Avro deserialization schema that reads schema from input stream using provided
SchemaCoder. |
| Modifier and Type | Method and Description |
|---|---|
T |
deserialize(byte[] message) |
boolean |
equals(Object o) |
int |
hashCode() |
forGeneric, forGeneric, forSpecific, forSpecific, getProducedType, isEndOfStreampublic 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 GenericRecordschemaCoderProvider - schema provider that allows instantiation of SchemaCoder
that will be used for schema readingpublic RegistryAvroDeserializationSchema(Class<T> recordClazz, @Nullable org.apache.avro.Schema reader, SchemaCoder.SchemaCoderProvider schemaCoderProvider, AvroFormatOptions.AvroEncoding encoding)
SchemaCoder.recordClazz - class to which deserialize. Should be either SpecificRecord or
GenericRecord.reader - reader's Avro schema. Should be provided if recordClazz is GenericRecordschemaCoderProvider - schema provider that allows instantiation of SchemaCoder
that will be used for schema readingencoding - Avro serialization approach to use. Required to identify the correct decoder
class to use.public T deserialize(@Nullable byte[] message) throws IOException
deserialize in interface org.apache.flink.api.common.serialization.DeserializationSchema<T>deserialize in class AvroDeserializationSchema<T>IOExceptionpublic 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.