public class AvroRowDataSerializationSchema extends Object implements org.apache.flink.api.common.serialization.SerializationSchema<org.apache.flink.table.data.RowData>
RowData into Avro bytes.
Serializes objects that are represented in (nested) Flink RowData. 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
AvroRowDataDeserializationSchema and schema converter AvroSchemaConverter.
| Constructor and Description |
|---|
AvroRowDataSerializationSchema(org.apache.flink.table.types.logical.RowType rowType)
Creates an Avro serialization schema with the given record row type.
|
AvroRowDataSerializationSchema(org.apache.flink.table.types.logical.RowType rowType,
AvroFormatOptions.AvroEncoding encoding)
Creates an Avro serialization schema with the given record row type.
|
AvroRowDataSerializationSchema(org.apache.flink.table.types.logical.RowType rowType,
AvroFormatOptions.AvroEncoding encoding,
boolean legacyTimestampMapping)
Creates an Avro serialization schema with the given record row type and legacy timestamp
mapping flag.
|
AvroRowDataSerializationSchema(org.apache.flink.table.types.logical.RowType rowType,
org.apache.flink.api.common.serialization.SerializationSchema<org.apache.avro.generic.GenericRecord> nestedSchema,
RowDataToAvroConverters.RowDataToAvroConverter runtimeConverter)
Creates an Avro serialization schema with the given record row type, nested schema and
runtime converters.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
int |
hashCode() |
void |
open(org.apache.flink.api.common.serialization.SerializationSchema.InitializationContext context) |
byte[] |
serialize(org.apache.flink.table.data.RowData row) |
public AvroRowDataSerializationSchema(org.apache.flink.table.types.logical.RowType rowType)
public AvroRowDataSerializationSchema(org.apache.flink.table.types.logical.RowType rowType,
AvroFormatOptions.AvroEncoding encoding)
encoding - The serialization approach used to serialize the data.public AvroRowDataSerializationSchema(org.apache.flink.table.types.logical.RowType rowType,
AvroFormatOptions.AvroEncoding encoding,
boolean legacyTimestampMapping)
encoding - The serialization approach used to serialize the data.legacyTimestampMapping - Use the legacy timestamp mapping.public AvroRowDataSerializationSchema(org.apache.flink.table.types.logical.RowType rowType,
org.apache.flink.api.common.serialization.SerializationSchema<org.apache.avro.generic.GenericRecord> nestedSchema,
RowDataToAvroConverters.RowDataToAvroConverter runtimeConverter)
public void open(org.apache.flink.api.common.serialization.SerializationSchema.InitializationContext context)
throws Exception
open in interface org.apache.flink.api.common.serialization.SerializationSchema<org.apache.flink.table.data.RowData>Exceptionpublic byte[] serialize(org.apache.flink.table.data.RowData row)
serialize in interface org.apache.flink.api.common.serialization.SerializationSchema<org.apache.flink.table.data.RowData>Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.