Class RegistryAvroDeserializationSchema<T>

java.lang.Object
org.apache.flink.formats.avro.AvroDeserializationSchema<T>
org.apache.flink.formats.avro.RegistryAvroDeserializationSchema<T>
Type Parameters:
T - type of record it produces
All Implemented Interfaces:
Serializable, org.apache.flink.api.common.serialization.DeserializationSchema<T>, org.apache.flink.api.java.typeutils.ResultTypeQueryable<T>

public class RegistryAvroDeserializationSchema<T> extends AvroDeserializationSchema<T>
Deserialization schema that deserializes from Avro format using SchemaCoder.
See Also:
  • Constructor Details

    • RegistryAvroDeserializationSchema

      public RegistryAvroDeserializationSchema(Class<T> recordClazz, @Nullable org.apache.avro.Schema reader, SchemaCoder.SchemaCoderProvider schemaCoderProvider)
      Creates Avro deserialization schema that reads schema from input stream using provided SchemaCoder.
      Parameters:
      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 reading
    • RegistryAvroDeserializationSchema

      public RegistryAvroDeserializationSchema(Class<T> recordClazz, @Nullable org.apache.avro.Schema reader, SchemaCoder.SchemaCoderProvider schemaCoderProvider, AvroFormatOptions.AvroEncoding encoding)
      Creates Avro deserialization schema that reads schema from input stream using provided SchemaCoder.
      Parameters:
      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 reading
      encoding - Avro serialization approach to use. Required to identify the correct decoder class to use.
  • Method Details