jiangpengcheng commented on code in PR #21675:
URL: https://github.com/apache/pulsar/pull/21675#discussion_r1419860526


##########
pulsar-io/kafka/src/main/java/org/apache/pulsar/io/kafka/KafkaSourceConfig.java:
##########
@@ -152,8 +153,13 @@ public static KafkaSourceConfig load(String yamlFile) 
throws IOException {
         return mapper.readValue(new File(yamlFile), KafkaSourceConfig.class);
     }
 
-    public static KafkaSourceConfig load(Map<String, Object> map) throws 
IOException {
+    public static KafkaSourceConfig load(Map<String, Object> map, 
SourceContext sourceContext) throws IOException {
         ObjectMapper mapper = new ObjectMapper();
+        try {
+            map.put("sslTruststorePassword", 
sourceContext.getSecret("sslTruststorePassword"));
+        } catch (Exception e) {
+            // ignore
+        }
         
mapper.enable(DeserializationFeature.ACCEPT_EMPTY_STRING_AS_NULL_OBJECT);

Review Comment:
   not sure whether this option has effect on other connectors configs, so I 
only keep it here for KafkaSource only



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to