T
- The type created by the deserialization schema.@Internal public class KinesisDeserializationSchemaWrapper<T> extends Object implements KinesisDeserializationSchema<T>
DeserializationSchema
with the KinesisDeserializationSchema
interface.Constructor and Description |
---|
KinesisDeserializationSchemaWrapper(DeserializationSchema<T> deserializationSchema) |
Modifier and Type | Method and Description |
---|---|
T |
deserialize(byte[] recordValue,
String partitionKey,
String seqNum,
long approxArrivalTimestamp,
String stream,
String shardId)
Deserializes a Kinesis record's bytes.
|
TypeInformation<T> |
getProducedType()
Gets the data type (as a
TypeInformation ) produced by this function or input format. |
void |
open(DeserializationSchema.InitializationContext context)
Initialization method for the schema.
|
public KinesisDeserializationSchemaWrapper(DeserializationSchema<T> deserializationSchema)
public void open(DeserializationSchema.InitializationContext context) throws Exception
KinesisDeserializationSchema
KinesisDeserializationSchema.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<T>
context
- Contextual information that can be used during initialization.Exception
public T deserialize(byte[] recordValue, String partitionKey, String seqNum, long approxArrivalTimestamp, String stream, String shardId) throws IOException
KinesisDeserializationSchema
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.deserialize
in interface KinesisDeserializationSchema<T>
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).IOException
public TypeInformation<T> getProducedType()
ResultTypeQueryable
TypeInformation
) produced by this function or input format.getProducedType
in interface ResultTypeQueryable<T>
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.