@PublicEvolving
public class AvroRowDeserializationSchema
extends org.apache.flink.api.common.serialization.AbstractDeserializationSchema<org.apache.flink.types.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.
| Constructor and Description |
|---|
AvroRowDeserializationSchema(Class<? extends org.apache.avro.specific.SpecificRecord> recordClazz)
Creates a Avro deserialization schema for the given specific record class.
|
AvroRowDeserializationSchema(String avroSchemaString)
Creates a Avro deserialization schema for the given Avro schema string.
|
| Modifier and Type | Method and Description |
|---|---|
org.apache.flink.types.Row |
deserialize(byte[] message) |
boolean |
equals(Object o) |
org.apache.flink.api.common.typeinfo.TypeInformation<org.apache.flink.types.Row> |
getProducedType() |
int |
hashCode() |
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 org.apache.flink.types.Row deserialize(byte[] message)
throws IOException
deserialize in interface org.apache.flink.api.common.serialization.DeserializationSchema<org.apache.flink.types.Row>deserialize in class org.apache.flink.api.common.serialization.AbstractDeserializationSchema<org.apache.flink.types.Row>IOExceptionpublic org.apache.flink.api.common.typeinfo.TypeInformation<org.apache.flink.types.Row> getProducedType()
getProducedType in interface org.apache.flink.api.java.typeutils.ResultTypeQueryable<org.apache.flink.types.Row>getProducedType in class org.apache.flink.api.common.serialization.AbstractDeserializationSchema<org.apache.flink.types.Row>Copyright © 2014–2019 The Apache Software Foundation. All rights reserved.