You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2019/05/17 03:50:03 UTC

[GitHub] [pulsar] merlimat commented on a change in pull request #4284: [Issue 4283][flink] construct auth when building pulsar source

merlimat commented on a change in pull request #4284: [Issue 4283][flink] construct auth when building pulsar source
URL: https://github.com/apache/pulsar/pull/4284#discussion_r284969964
 
 

 ##########
 File path: pulsar-flink/src/main/java/org/apache/flink/streaming/connectors/pulsar/PulsarSourceBuilder.java
 ##########
 @@ -277,9 +278,27 @@ private PulsarSourceBuilder(DeserializationSchema<T> deserializationSchema) {
                 "At least one topic or topics pattern is required");
         Preconditions.checkArgument(StringUtils.isNotBlank(this.consumerConfigurationData.getSubscriptionName()),
                 "a subscription name is required");
+
+        setTransientFields();
+
         return new PulsarConsumerSource<>(this);
     }
 
+    private void setTransientFields() throws PulsarClientException {
+        setAuth();
+    }
+
+    private void setAuth() throws PulsarClientException{
+        if (StringUtils.isBlank(this.clientConfigurationData.getAuthPluginClassName())
+                && this.clientConfigurationData.getAuthParams() == null || this.clientConfigurationData.getAuthParams().isEmpty())
 
 Review comment:
   ```suggestion
                   && StringUtils.isBlank(this.clientConfigurationData.getAuthParams()))
   ```

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services