Package org.apache.flink.formats.avro
Class AvroRowDeserializationSchema
- java.lang.Object
-
- org.apache.flink.api.common.serialization.AbstractDeserializationSchema<org.apache.flink.types.Row>
-
- org.apache.flink.formats.avro.AvroRowDeserializationSchema
-
- All Implemented Interfaces:
Serializable,org.apache.flink.api.common.serialization.DeserializationSchema<org.apache.flink.types.Row>,org.apache.flink.api.java.typeutils.ResultTypeQueryable<org.apache.flink.types.Row>
@PublicEvolving @Deprecated public class AvroRowDeserializationSchema extends org.apache.flink.api.common.serialization.AbstractDeserializationSchema<org.apache.flink.types.Row>
Deprecated.The format was developed for the Table API users and will not be maintained for DataStream API users anymore. Either use Table API or switch to Data Stream, defining your ownDeserializationSchema.Deserialization schema from Avro bytes toRow.Deserializes the
byte[]messages into (nested) Flink rows. It converts Avro types into types that are compatible with Flink's Table & SQL API.Projects with Avro records containing logical date/time types need to add a JodaTime dependency.
Note: Changes in this class need to be kept in sync with the corresponding runtime class
AvroRowSerializationSchemaand schema converterAvroSchemaConverter.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AvroRowDeserializationSchema(Class<? extends org.apache.avro.specific.SpecificRecord> recordClazz)Deprecated.Creates a Avro deserialization schema for the given specific record class.AvroRowDeserializationSchema(String avroSchemaString)Deprecated.Creates a Avro deserialization schema for the given Avro schema string.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description org.apache.flink.types.Rowdeserialize(byte[] message)Deprecated.booleanequals(Object o)Deprecated.org.apache.flink.api.common.typeinfo.TypeInformation<org.apache.flink.types.Row>getProducedType()Deprecated.inthashCode()Deprecated.-
Methods inherited from class org.apache.flink.api.common.serialization.AbstractDeserializationSchema
isEndOfStream
-
-
-
-
Constructor Detail
-
AvroRowDeserializationSchema
public AvroRowDeserializationSchema(Class<? extends org.apache.avro.specific.SpecificRecord> recordClazz)
Deprecated.Creates a Avro deserialization schema for the given specific record class. Having the concrete Avro record class might improve performance.- Parameters:
recordClazz- Avro record class used to deserialize Avro's record to Flink's row
-
AvroRowDeserializationSchema
public AvroRowDeserializationSchema(String avroSchemaString)
Deprecated.Creates a Avro deserialization schema for the given Avro schema string.- Parameters:
avroSchemaString- Avro schema string to deserialize Avro's record to Flink's row
-
-
Method Detail
-
deserialize
public org.apache.flink.types.Row deserialize(byte[] message) throws IOExceptionDeprecated.- Specified by:
deserializein interfaceorg.apache.flink.api.common.serialization.DeserializationSchema<org.apache.flink.types.Row>- Specified by:
deserializein classorg.apache.flink.api.common.serialization.AbstractDeserializationSchema<org.apache.flink.types.Row>- Throws:
IOException
-
getProducedType
public org.apache.flink.api.common.typeinfo.TypeInformation<org.apache.flink.types.Row> getProducedType()
Deprecated.- Specified by:
getProducedTypein interfaceorg.apache.flink.api.java.typeutils.ResultTypeQueryable<org.apache.flink.types.Row>- Overrides:
getProducedTypein classorg.apache.flink.api.common.serialization.AbstractDeserializationSchema<org.apache.flink.types.Row>
-
-