Package org.apache.flink.formats.avro
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>
Deserialization schema that deserializes from Avro format using
SchemaCoder.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.flink.api.common.serialization.DeserializationSchema
org.apache.flink.api.common.serialization.DeserializationSchema.InitializationContext -
Constructor Summary
ConstructorsConstructorDescriptionRegistryAvroDeserializationSchema(Class<T> recordClazz, org.apache.avro.Schema reader, SchemaCoder.SchemaCoderProvider schemaCoderProvider) Creates Avro deserialization schema that reads schema from input stream using providedSchemaCoder.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 providedSchemaCoder. -
Method Summary
Methods inherited from class org.apache.flink.formats.avro.AvroDeserializationSchema
forGeneric, forGeneric, forSpecific, forSpecific, getProducedType, isEndOfStreamMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.flink.api.common.serialization.DeserializationSchema
deserialize, open
-
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 providedSchemaCoder.- Parameters:
recordClazz- class to which deserialize. Should be eitherSpecificRecordorGenericRecord.reader- reader's Avro schema. Should be provided if recordClazz isGenericRecordschemaCoderProvider- schema provider that allows instantiation ofSchemaCoderthat 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 providedSchemaCoder.- Parameters:
recordClazz- class to which deserialize. Should be eitherSpecificRecordorGenericRecord.reader- reader's Avro schema. Should be provided if recordClazz isGenericRecordschemaCoderProvider- schema provider that allows instantiation ofSchemaCoderthat will be used for schema readingencoding- Avro serialization approach to use. Required to identify the correct decoder class to use.
-
-
Method Details
-
deserialize
- Specified by:
deserializein interfaceorg.apache.flink.api.common.serialization.DeserializationSchema<T>- Overrides:
deserializein classAvroDeserializationSchema<T>- Throws:
IOException
-
equals
- Overrides:
equalsin classAvroDeserializationSchema<T>
-
hashCode
public int hashCode()- Overrides:
hashCodein classAvroDeserializationSchema<T>
-