T - The type created by the keyed deserialization schema.@PublicEvolving public interface PulsarDeserializationSchema<T> extends PulsarContextAware<T>, Serializable
| Modifier and Type | Method and Description |
|---|---|
static <V> PulsarDeserializationSchemaBuilder<V> |
builder()
Deprecated.
|
T |
deserialize(org.apache.pulsar.client.api.Message<T> message)
Deserializes the Pulsar message.
|
default void |
deserialize(org.apache.pulsar.client.api.Message<T> message,
org.apache.flink.util.Collector<T> out)
Deserializes the Pulsar message.
|
boolean |
isEndOfStream(T nextElement)
Method to decide whether the element signals the end of the stream.
|
default void |
open(org.apache.flink.api.common.serialization.DeserializationSchema.InitializationContext context) |
static <V> PulsarDeserializationSchema<V> |
valueOnly(org.apache.flink.api.common.serialization.DeserializationSchema<V> valueDeserializer)
Wraps a Flink
DeserializationSchema to a PulsarDeserializationSchema. |
getSchema, getTargetTopic, setNumParallelInstances, setParallelInstanceId@Deprecated static <V> PulsarDeserializationSchemaBuilder<V> builder()
static <V> PulsarDeserializationSchema<V> valueOnly(org.apache.flink.api.common.serialization.DeserializationSchema<V> valueDeserializer)
DeserializationSchema to a PulsarDeserializationSchema.V - the value type.valueDeserializer - the deserializer class used to deserialize the value.PulsarDeserializationSchema that deserialize the value with the given deserializer.default void open(org.apache.flink.api.common.serialization.DeserializationSchema.InitializationContext context)
throws Exception
Exceptionboolean isEndOfStream(T nextElement)
nextElement - The element to test for the end-of-stream signal.T deserialize(org.apache.pulsar.client.api.Message<T> message) throws IOException
Can output multiple records through the Collector. Note that number and size of the
produced records should be relatively small. Depending on the source implementation records
can be buffered in memory or collecting records might delay emitting checkpoint barrier.
message - The message, as a byte array.IOExceptiondefault void deserialize(org.apache.pulsar.client.api.Message<T> message, org.apache.flink.util.Collector<T> out) throws IOException
Can output multiple records through the Collector. Note that number and size of the
produced records should be relatively small. Depending on the source implementation records
can be buffered in memory or collecting records might delay emitting checkpoint barrier.
message - The message, as a byte array.out - The collector to put the resulting messages.IOExceptionCopyright © 2019–2021 The Apache Software Foundation. All rights reserved.