public final class CanalJsonDeserializationSchema extends Object implements org.apache.flink.api.common.serialization.DeserializationSchema<org.apache.flink.table.data.RowData>
RowData. The deserialization schema knows Canal's schema definition and can extract the database
data and convert into RowData with RowKind.
Deserializes a byte[] message as a JSON object and reads the specified fields.
Failures during deserialization are forwarded as wrapped IOExceptions.
| Modifier and Type | Class and Description |
|---|---|
static class |
CanalJsonDeserializationSchema.Builder
A builder for creating a
CanalJsonDeserializationSchema. |
| Modifier and Type | Method and Description |
|---|---|
static CanalJsonDeserializationSchema.Builder |
builder(org.apache.flink.table.types.DataType physicalDataType,
List<org.apache.flink.formats.json.canal.CanalJsonDecodingFormat.ReadableMetadata> requestedMetadata,
org.apache.flink.api.common.typeinfo.TypeInformation<org.apache.flink.table.data.RowData> producedTypeInfo)
Creates A builder for building a
CanalJsonDeserializationSchema. |
org.apache.flink.table.data.RowData |
deserialize(byte[] message) |
void |
deserialize(byte[] message,
org.apache.flink.util.Collector<org.apache.flink.table.data.RowData> out) |
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) |
public static CanalJsonDeserializationSchema.Builder builder(org.apache.flink.table.types.DataType physicalDataType, List<org.apache.flink.formats.json.canal.CanalJsonDecodingFormat.ReadableMetadata> requestedMetadata, org.apache.flink.api.common.typeinfo.TypeInformation<org.apache.flink.table.data.RowData> producedTypeInfo)
CanalJsonDeserializationSchema.public org.apache.flink.table.data.RowData deserialize(byte[] message)
throws IOException
deserialize in interface org.apache.flink.api.common.serialization.DeserializationSchema<org.apache.flink.table.data.RowData>IOExceptionpublic void deserialize(@Nullable byte[] message, org.apache.flink.util.Collector<org.apache.flink.table.data.RowData> out) throws IOException
deserialize in interface org.apache.flink.api.common.serialization.DeserializationSchema<org.apache.flink.table.data.RowData>IOExceptionpublic boolean isEndOfStream(org.apache.flink.table.data.RowData nextElement)
isEndOfStream in interface 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 in interface org.apache.flink.api.java.typeutils.ResultTypeQueryable<org.apache.flink.table.data.RowData>Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.