DeserializationSchema
.@PublicEvolving @Deprecated public class AvroRowDeserializationSchema extends AbstractDeserializationSchema<Row>
Row
.
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
AvroRowSerializationSchema
and schema converter AvroSchemaConverter
.
DeserializationSchema.InitializationContext
Constructor and 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.
|
Modifier and Type | Method and Description |
---|---|
Row |
deserialize(byte[] message)
Deprecated.
De-serializes the byte message.
|
boolean |
equals(Object o)
Deprecated.
|
TypeInformation<Row> |
getProducedType()
Deprecated.
Gets the type produced by this deserializer.
|
int |
hashCode()
Deprecated.
|
isEndOfStream
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
deserialize, open
public AvroRowDeserializationSchema(Class<? extends org.apache.avro.specific.SpecificRecord> recordClazz)
recordClazz
- Avro record class used to deserialize Avro's record to Flink's rowpublic AvroRowDeserializationSchema(String avroSchemaString)
avroSchemaString
- Avro schema string to deserialize Avro's record to Flink's rowpublic Row deserialize(byte[] message) throws IOException
AbstractDeserializationSchema
deserialize
in interface DeserializationSchema<Row>
deserialize
in class AbstractDeserializationSchema<Row>
message
- The message, as a byte array.IOException
public TypeInformation<Row> getProducedType()
AbstractDeserializationSchema
getProducedType
in interface ResultTypeQueryable<Row>
getProducedType
in class AbstractDeserializationSchema<Row>
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.