@Internal public final class RowDataKinesisDeserializationSchema extends Object implements KinesisDeserializationSchema<org.apache.flink.table.data.RowData>
KinesisDeserializationSchema adaptor for RowData records that delegates
physical data deserialization to an inner DeserializationSchema and appends requested
metadata to the end of the deserialized RowData record.| Constructor and Description |
|---|
RowDataKinesisDeserializationSchema(org.apache.flink.api.common.serialization.DeserializationSchema<org.apache.flink.table.data.RowData> physicalDeserializer,
org.apache.flink.api.common.typeinfo.TypeInformation<org.apache.flink.table.data.RowData> producedTypeInfo) |
| Modifier and Type | Method and Description |
|---|---|
org.apache.flink.table.data.RowData |
deserialize(byte[] recordValue,
String partitionKey,
String seqNum,
long approxArrivalTimestamp,
String stream,
String shardId)
Deserializes a Kinesis record's bytes.
|
org.apache.flink.api.common.typeinfo.TypeInformation<org.apache.flink.table.data.RowData> |
getProducedType() |
void |
open(org.apache.flink.api.common.serialization.DeserializationSchema.InitializationContext context)
Initialization method for the schema.
|
public RowDataKinesisDeserializationSchema(org.apache.flink.api.common.serialization.DeserializationSchema<org.apache.flink.table.data.RowData> physicalDeserializer,
org.apache.flink.api.common.typeinfo.TypeInformation<org.apache.flink.table.data.RowData> producedTypeInfo)
public void open(org.apache.flink.api.common.serialization.DeserializationSchema.InitializationContext context)
throws Exception
KinesisDeserializationSchemaKinesisDeserializationSchema.deserialize(byte[], java.lang.String, java.lang.String, long, java.lang.String, java.lang.String) and thus suitable for one time setup work.
The provided DeserializationSchema.InitializationContext can be used to access additional features such as e.g.
registering user metrics.
open in interface KinesisDeserializationSchema<org.apache.flink.table.data.RowData>context - Contextual information that can be used during initialization.Exceptionpublic org.apache.flink.table.data.RowData deserialize(byte[] recordValue,
String partitionKey,
String seqNum,
long approxArrivalTimestamp,
String stream,
String shardId)
throws IOException
KinesisDeserializationSchemanull
may be returned. This informs the Flink Kinesis Consumer to process the Kinesis record
without producing any output for it, i.e. effectively "skipping" the record.deserialize in interface KinesisDeserializationSchema<org.apache.flink.table.data.RowData>recordValue - the record's value as a byte arraypartitionKey - the record's partition key at the time of writingseqNum - the sequence number of this record in the Kinesis shardapproxArrivalTimestamp - the server-side timestamp of when Kinesis received and stored the recordstream - the name of the Kinesis stream that this record was sent toshardId - The identifier of the shard the record was sent tonull if the message cannot be deserialized).IOExceptionpublic 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–2022 The Apache Software Foundation. All rights reserved.