sijie commented on a change in pull request #14: URL: https://github.com/apache/pulsar-adapters/pull/14#discussion_r657609793
########## File path: pulsar-spark/src/main/java/org/apache/pulsar/spark/SparkStreamingPulsarReceiver.java ########## @@ -43,34 +46,52 @@ private static final Logger LOG = LoggerFactory.getLogger(SparkStreamingPulsarReceiver.class); private String serviceUrl; - private ConsumerConfigurationData<byte[]> conf; + private Map<String,Object> clientConfig; + private ConsumerConfigurationData<byte[]> consumerConfig; private Authentication authentication; private PulsarClient pulsarClient; private Consumer<byte[]> consumer; public SparkStreamingPulsarReceiver( String serviceUrl, - ConsumerConfigurationData<byte[]> conf, + ConsumerConfigurationData<byte[]> consumerConfig, Authentication authentication) { - this(StorageLevel.MEMORY_AND_DISK_2(), serviceUrl, conf, authentication); + this(StorageLevel.MEMORY_AND_DISK_2(), serviceUrl, new HashMap<>(), consumerConfig, authentication); + } + + public SparkStreamingPulsarReceiver( + String serviceUrl, + Map<String,Object> clientConfig, + ConsumerConfigurationData<byte[]> consumerConfig, + Authentication authentication) { + this(StorageLevel.MEMORY_AND_DISK_2(), serviceUrl, clientConfig, consumerConfig, authentication); + } + + public SparkStreamingPulsarReceiver(StorageLevel storageLevel, Review comment: We are introducing a new parameter `storageLevel`. But it was not used. ########## File path: pulsar-spark/src/main/java/org/apache/pulsar/spark/SparkStreamingPulsarReceiver.java ########## @@ -43,34 +46,52 @@ private static final Logger LOG = LoggerFactory.getLogger(SparkStreamingPulsarReceiver.class); private String serviceUrl; - private ConsumerConfigurationData<byte[]> conf; + private Map<String,Object> clientConfig; + private ConsumerConfigurationData<byte[]> consumerConfig; private Authentication authentication; private PulsarClient pulsarClient; private Consumer<byte[]> consumer; public SparkStreamingPulsarReceiver( String serviceUrl, - ConsumerConfigurationData<byte[]> conf, + ConsumerConfigurationData<byte[]> consumerConfig, Authentication authentication) { - this(StorageLevel.MEMORY_AND_DISK_2(), serviceUrl, conf, authentication); + this(StorageLevel.MEMORY_AND_DISK_2(), serviceUrl, new HashMap<>(), consumerConfig, authentication); + } + + public SparkStreamingPulsarReceiver( Review comment: Why we are going to introduce so many new builders? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org