confluentinc/kafka-connect-storage-common

Partitioner classes misuse PartitionerConfig

Closed this issue · 2 comments

The classes extending Partitioner misuse PartitionerConfig as a simple storage for configuration key constants, which prevents it from being extended by third parties in a way that requires other configuration parameters.

Because of the way it is currently used, DataWriter in kafka-connect-hdfs (and, presumably other users) need to provide the "parsed" configuration, which, for example, handles conversion of numeric values into Long. Parsed configurations, however, do not include unknown keys, and there's no way of "injecting" keys.

Instead, all of the classes extending Partitioner should instantiate a PartitionerConfig from the properties received, and get their properties through it, so that unfiltered properties can be used to instantiate those classes.

Looks like I reported this twice., as I missed this ticket. It's also reported as #75 .

I can confirm the duplication of the tickets atm :)
Closing this one as duplicate, as you mention, and will move the discussion to #75