atezs82 commented on a change in pull request #14:
URL: https://github.com/apache/pulsar-adapters/pull/14#discussion_r657772386



##########
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:
       I would be happy to remove eg. the one having a default storage level: 
   ```
   public SparkStreamingPulsarReceiver(
               String serviceUrl,
               Map<String,Object> clientConfig,
               ConsumerConfigurationData<byte[]> consumerConfig,
               Authentication authentication) {
           this(StorageLevel.MEMORY_AND_DISK_2(), serviceUrl, clientConfig, 
consumerConfig, authentication);
       }
   ```
   In that way we might have broader functionality (we just enforce the user to 
set the storage level whenever client configuration is provided).




-- 
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


Reply via email to