@PublicEvolving @FunctionalInterface public interface RangeGenerator extends Serializable
TopicRangefor given topic. It was used for pulsar's
TopicRangewould be used in
KeySharedPolicyfor different pulsar source readers.
If you implement this interface, make sure that each
TopicRange would be assigned to a
specified source reader. Since flink parallelism is provided, make sure the pulsar message key's
hashcode is evenly distributed among these topic ranges.
|Modifier and Type||Method and Description|
Initialize some extra resource when bootstrap the source.
Generate range for the given topic.
List<TopicRange> range(TopicMetadata metadata, int parallelism)
metadata- The metadata of the topic.
parallelism- The reader size for this topic.
default void open(SourceConfiguration sourceConfiguration)
Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.