@PublicEvolving public class AvroRowDataDeserializationSchema extends Object implements org.apache.flink.api.common.serialization.DeserializationSchema<org.apache.flink.table.data.RowData>
RowData.
Deserializes the byte[] messages into (nested) Flink RowData. 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
AvroRowDataSerializationSchema and schema converter AvroSchemaConverter.
| 构造器和说明 |
|---|
AvroRowDataDeserializationSchema(org.apache.flink.api.common.serialization.DeserializationSchema<org.apache.avro.generic.GenericRecord> nestedSchema,
AvroToRowDataConverters.AvroToRowDataConverter runtimeConverter,
org.apache.flink.api.common.typeinfo.TypeInformation<org.apache.flink.table.data.RowData> typeInfo)
Creates a Avro deserialization schema for the given logical type.
|
AvroRowDataDeserializationSchema(org.apache.flink.table.types.logical.RowType rowType,
org.apache.flink.api.common.typeinfo.TypeInformation<org.apache.flink.table.data.RowData> typeInfo)
Creates a Avro deserialization schema for the given logical type.
|
| 限定符和类型 | 方法和说明 |
|---|---|
org.apache.flink.table.data.RowData |
deserialize(byte[] message) |
boolean |
equals(Object o) |
org.apache.flink.api.common.typeinfo.TypeInformation<org.apache.flink.table.data.RowData> |
getProducedType() |
int |
hashCode() |
boolean |
isEndOfStream(org.apache.flink.table.data.RowData nextElement) |
void |
open(org.apache.flink.api.common.serialization.DeserializationSchema.InitializationContext context) |
public AvroRowDataDeserializationSchema(org.apache.flink.table.types.logical.RowType rowType,
org.apache.flink.api.common.typeinfo.TypeInformation<org.apache.flink.table.data.RowData> typeInfo)
rowType - The logical type used to deserialize the data.typeInfo - The TypeInformation to be used by getProducedType().public AvroRowDataDeserializationSchema(org.apache.flink.api.common.serialization.DeserializationSchema<org.apache.avro.generic.GenericRecord> nestedSchema,
AvroToRowDataConverters.AvroToRowDataConverter runtimeConverter,
org.apache.flink.api.common.typeinfo.TypeInformation<org.apache.flink.table.data.RowData> typeInfo)
nestedSchema - Deserialization schema to deserialize as GenericRecordruntimeConverter - Converter that transforms a GenericRecord into RowDatatypeInfo - The TypeInformation to be used by getProducedType()public void open(org.apache.flink.api.common.serialization.DeserializationSchema.InitializationContext context)
throws Exception
open 在接口中 org.apache.flink.api.common.serialization.DeserializationSchema<org.apache.flink.table.data.RowData>Exceptionpublic org.apache.flink.table.data.RowData deserialize(@Nullable byte[] message) throws IOException
deserialize 在接口中 org.apache.flink.api.common.serialization.DeserializationSchema<org.apache.flink.table.data.RowData>IOExceptionpublic boolean isEndOfStream(org.apache.flink.table.data.RowData nextElement)
isEndOfStream 在接口中 org.apache.flink.api.common.serialization.DeserializationSchema<org.apache.flink.table.data.RowData>public org.apache.flink.api.common.typeinfo.TypeInformation<org.apache.flink.table.data.RowData> getProducedType()
getProducedType 在接口中 org.apache.flink.api.java.typeutils.ResultTypeQueryable<org.apache.flink.table.data.RowData>Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.