public class PulsarTypeInformationWrapper<T> extends Object implements PulsarDeserializationSchema<T>
PulsarDeserializationSchema
. We would create a
flink TypeSerializer
by using given ExecutionConfig. This execution config could be
ExecutionEnvironment.getConfig()
.Constructor and Description |
---|
PulsarTypeInformationWrapper(TypeInformation<T> information,
ExecutionConfig config) |
Modifier and Type | Method and Description |
---|---|
void |
deserialize(org.apache.pulsar.client.api.Message<byte[]> message,
Collector<T> out)
Deserializes the pulsar message.
|
TypeInformation<T> |
getProducedType()
Gets the data type (as a
TypeInformation ) produced by this function or input format. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
flinkSchema, flinkTypeInfo, open, open, pulsarSchema, pulsarSchema, pulsarSchema
public PulsarTypeInformationWrapper(TypeInformation<T> information, ExecutionConfig config)
public void deserialize(org.apache.pulsar.client.api.Message<byte[]> message, Collector<T> out) throws Exception
PulsarDeserializationSchema
You can output multiple message by using 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.
deserialize
in interface PulsarDeserializationSchema<T>
message
- The message decoded by pulsar.out
- The collector to put the resulting messages.Exception
public TypeInformation<T> getProducedType()
ResultTypeQueryable
TypeInformation
) produced by this function or input format.getProducedType
in interface ResultTypeQueryable<T>
Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.