Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-6192

In Config always transform Properties to Map

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • clients
    • None

    Description

      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?

      Attachments

        Activity

          People

            Unassigned Unassigned
            cmolter Charly Molter
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: