You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Charly Molter (JIRA)" <ji...@apache.org> on 2017/11/09 15:03:00 UTC

[jira] [Created] (KAFKA-6192) In Config always transform Properties to Map

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)