JingsongLi commented on a change in pull request #10468: [FLINK-14649][table 
sql / api] Flatten all the connector properties keys to make it easy to 
configure in DDL
URL: https://github.com/apache/flink/pull/10468#discussion_r355122412
 
 

 ##########
 File path: 
flink-connectors/flink-connector-kafka-base/src/main/java/org/apache/flink/streaming/connectors/kafka/KafkaTableSourceSinkFactoryBase.java
 ##########
 @@ -274,13 +279,27 @@ private DescriptorProperties 
getValidatedProperties(Map<String, String> properti
 
        private Properties getKafkaProperties(DescriptorProperties 
descriptorProperties) {
                final Properties kafkaProperties = new Properties();
-               final List<Map<String, String>> propsList = 
descriptorProperties.getFixedIndexedProperties(
-                       CONNECTOR_PROPERTIES,
-                       Arrays.asList(CONNECTOR_PROPERTIES_KEY, 
CONNECTOR_PROPERTIES_VALUE));
-               propsList.forEach(kv -> kafkaProperties.put(
-                       
descriptorProperties.getString(kv.get(CONNECTOR_PROPERTIES_KEY)),
-                       
descriptorProperties.getString(kv.get(CONNECTOR_PROPERTIES_VALUE))
-               ));
+
+               if 
(descriptorProperties.containsKey(CONNECTOR_PROPERTIES_ZOOKEEPER_CONNECT)
 
 Review comment:
   Create a util method this code?
   ```
   if (descriptorProperties.containsKey(CONNECTOR_PROPERTIES_ZOOKEEPER_CONNECT)
   || descriptorProperties.containsKey(CONNECTOR_PROPERTIES_BOOTSTRAP_SERVER)
                                || 
descriptorProperties.containsKey(CONNECTOR_PROPERTIES_GROUP_ID)
   ```

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to