[ 
https://issues.apache.org/jira/browse/KAFKA-2026?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14648279#comment-14648279
 ] 

Ewen Cheslack-Postava commented on KAFKA-2026:
----------------------------------------------

[~guozhang] This looks fine to commit as it addresses the most basic problem 
where it suggested you had set null config parameters when you hadn't. It's 
definitely better than the current code. I'm still not sure if we should do 
something more though, since I regularly see warnings from this code because we 
pass schema.registry.url in via configs for the Confluent serializers and this 
will always complain about those extra settings that are to be passed to 
serializers. I guess since they are warnings it's not that big a deal, but it's 
not great to have expected and standard usage result in warnings...

> Logging of unused options always shows null for the value and is misleading 
> if the option is used by serializers
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: KAFKA-2026
>                 URL: https://issues.apache.org/jira/browse/KAFKA-2026
>             Project: Kafka
>          Issue Type: Bug
>          Components: clients
>    Affects Versions: 0.8.2.1
>            Reporter: Ewen Cheslack-Postava
>            Assignee: Manikumar Reddy
>            Priority: Trivial
>             Fix For: 0.8.3
>
>         Attachments: KAFKA-2026.patch
>
>
> This is a really simple issue. When AbstractConfig logs unused messages, it 
> gets the value from the parsed configs. Since those are generated from the 
> ConfigDef, they value will not have been parsed or copied over from the 
> original map. This is especially confusing if you've explicitly set an option 
> to pass through to the serializers since you're always going to see these 
> warnings in your log.
> The simplest patch would grab the original value from this.originals. But now 
> I'm not sure logging this makes sense at all anymore since configuring any 
> serializer that has options that aren't in ProducerConfig will create a 
> misleading warning message. Further, using AbstractConfig for your serializer 
> implementation would cause all the producer's config settings to be logged as 
> unused. Since a single set of properties is being used to configure multiple 
> components, trying to log unused keys may not make sense anymore.
> Example of confusion caused by this: 
> http://mail-archives.apache.org/mod_mbox/kafka-users/201503.mbox/%3CCAPAVcJ8nwSVjia3%2BH893V%2B87StST6r0xN4O2ac8Es2bEXjv1OA%40mail.gmail.com%3E



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to