public class AvroRowSerializationSchema extends Object implements SerializationSchema<Row>
Row
into Avro bytes.
Serializes objects that are represented in (nested) Flink rows. It support types that are compatible with Flink's Table & SQL API.
Note: Changes in this class need to be kept in sync with the corresponding runtime class
AvroRowDeserializationSchema
and schema converter AvroSchemaConverter
.
SerializationSchema.InitializationContext
Constructor and Description |
---|
AvroRowSerializationSchema(Class<? extends org.apache.avro.specific.SpecificRecord> recordClazz)
Creates an Avro serialization schema for the given specific record class.
|
AvroRowSerializationSchema(String avroSchemaString)
Creates an Avro serialization schema for the given Avro schema string.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
int |
hashCode() |
byte[] |
serialize(Row row)
Serializes the incoming element to a specified type.
|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
open
public AvroRowSerializationSchema(Class<? extends org.apache.avro.specific.SpecificRecord> recordClazz)
recordClazz
- Avro record class used to serialize Flink's row to Avro's recordpublic AvroRowSerializationSchema(String avroSchemaString)
avroSchemaString
- Avro schema string used to serialize Flink's row to Avro's recordpublic byte[] serialize(Row row)
SerializationSchema
serialize
in interface SerializationSchema<Row>
row
- The incoming element to be serializedCopyright © 2014–2021 The Apache Software Foundation. All rights reserved.