Charly Molter created KAFKA-6192:
------------------------------------

             Summary: In Config always transform Properties to Map
                 Key: KAFKA-6192
                 URL: https://issues.apache.org/jira/browse/KAFKA-6192
             Project: Kafka
          Issue Type: Improvement
          Components: clients
            Reporter: Charly Molter
            Priority: Minor


Currently there's a lot of duplicated code in AbstractConfig, ConfigDef and 
Clients which works with both Properties and Map<String, Object>.

Properties is a Map<Object, Object> eventually we go through 
AbstractConfig.parse and convert the map to Map<String, Object> (throwing if a 
key is not a String).

It seems that the code would be a lot simpler if we were converting the 
Properties to Map<String, Object> early and only use this type after.

We'd introduce a static public method AbstractConfig.propsToMap() and 
AbstractConfig constructors would all be converted to Map<String, Object>

It would enable us to remove the duplicated 
ProducerConfig.addSerializerToConfig for example.

is AbstractConfig considered public API and should a KIP be open for this?



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to