Class RowDataKinesisDeserializationSchema

  • All Implemented Interfaces:
    Serializable, org.apache.flink.api.java.typeutils.ResultTypeQueryable<org.apache.flink.table.data.RowData>, KinesisDeserializationSchema<org.apache.flink.table.data.RowData>

    @Internal
    public final class RowDataKinesisDeserializationSchema
    extends Object
    implements KinesisDeserializationSchema<org.apache.flink.table.data.RowData>
    A 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.
    See Also:
    Serialized Form
    • Constructor Detail

      • RowDataKinesisDeserializationSchema

        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,
                                                   List<RowDataKinesisDeserializationSchema.Metadata> requestedMetadataFields)
    • Method Detail

      • deserialize

        public org.apache.flink.table.data.RowData deserialize​(byte[] recordValue,
                                                               String partitionKey,
                                                               String seqNum,
                                                               long approxArrivalTimestamp,
                                                               String stream,
                                                               String shardId)
                                                        throws IOException
        Description copied from interface: KinesisDeserializationSchema
        Deserializes a Kinesis record's bytes. If the record cannot be deserialized, null 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.
        Specified by:
        deserialize in interface KinesisDeserializationSchema<org.apache.flink.table.data.RowData>
        Parameters:
        recordValue - the record's value as a byte array
        partitionKey - the record's partition key at the time of writing
        seqNum - the sequence number of this record in the Kinesis shard
        approxArrivalTimestamp - the server-side timestamp of when Kinesis received and stored the record
        stream - the name of the Kinesis stream that this record was sent to
        shardId - The identifier of the shard the record was sent to
        Returns:
        the deserialized message as an Java object (null if the message cannot be deserialized).
        Throws:
        IOException
      • getProducedType

        public org.apache.flink.api.common.typeinfo.TypeInformation<org.apache.flink.table.data.RowData> getProducedType()
        Specified by:
        getProducedType in interface org.apache.flink.api.java.typeutils.ResultTypeQueryable<org.apache.flink.table.data.RowData>