public class AvroRowDeserializationSchema extends AbstractDeserializationSchema<Row>
SpecificRecord
to Row
.
Deserializes the byte[]
messages into (nested) Flink Rows.
Utf8
is converted to regular Java Strings.
Constructor and Description |
---|
AvroRowDeserializationSchema(Class<? extends org.apache.avro.specific.SpecificRecord> recordClazz)
Creates a Avro deserialization schema for the given record.
|
Modifier and Type | Method and Description |
---|---|
Row |
deserialize(byte[] message)
De-serializes the byte message.
|
getProducedType, isEndOfStream
public AvroRowDeserializationSchema(Class<? extends org.apache.avro.specific.SpecificRecord> recordClazz)
recordClazz
- Avro record class used 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
Copyright © 2014–2019 The Apache Software Foundation. All rights reserved.