public PulsarSourceBuilder<OUT> setRangeGenerator(RangeGenerator rangeGenerator) {
        if (configBuilder.contains(PULSAR_SUBSCRIPTION_TYPE)) {
            SubscriptionType subscriptionType = configBuilder.get(PULSAR_SUBSCRIPTION_TYPE);
            checkArgument(
                    subscriptionType == SubscriptionType.Key_Shared,
                    "Key_Shared subscription should be used for custom rangeGenerator instead of %s",
                    subscriptionType);
        } else {
            LOG.warn("No subscription type provided, set it to Key_Shared.");
            setSubscriptionType(SubscriptionType.Key_Shared);
        }
        this.rangeGenerator = checkNotNull(rangeGenerator);
        return this;
    }
Set a topic range generator for Key_Shared subscription.

@param rangeGenerator A generator which would generate a set of {@link TopicRange} for given
    topic.
@return this PulsarSourceBuilder.
inlong-sort/sort-flink/sort-flink-v1.15/sort-connectors/pulsar/src/main/java/org/apache/inlong/sort/pulsar/source/PulsarSourceBuilder.java