T - The type created by the deserialization schema.public interface PubSubDeserializationSchema<T> extends Serializable, org.apache.flink.api.java.typeutils.ResultTypeQueryable<T>
| 限定符和类型 | 方法和说明 |
|---|---|
T |
deserialize(com.google.pubsub.v1.PubsubMessage message)
Deserializes a PubsubMessage.
|
default void |
deserialize(com.google.pubsub.v1.PubsubMessage message,
org.apache.flink.util.Collector<T> out)
Deserializes the PubSub record.
|
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)
Initialization method for the schema.
|
default void open(org.apache.flink.api.common.serialization.DeserializationSchema.InitializationContext context)
throws Exception
deserialize(com.google.pubsub.v1.PubsubMessage) 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.
context - Contextual information that can be used during initialization.Exceptionboolean isEndOfStream(T nextElement)
nextElement - The element to test for the end-of-stream signal.T deserialize(com.google.pubsub.v1.PubsubMessage message) throws Exception
message - PubsubMessage to be deserialized.Exceptiondefault void deserialize(com.google.pubsub.v1.PubsubMessage message,
org.apache.flink.util.Collector<T> out)
throws Exception
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 - PubsubMessage to be deserialized.out - The collector to put the resulting messages.ExceptionCopyright © 2014–2020 The Apache Software Foundation. All rights reserved.