[jira] [Commented] (KAFKA-2268) New producer logs WARN if serializer supplied directly to constructor

2015-07-27 Thread Xuan Gong (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-2268?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14643573#comment-14643573
 ] 

Xuan Gong commented on KAFKA-2268:
--

Looks like this is duplicate with 
https://issues.apache.org/jira/browse/KAFKA-2289

 New producer logs WARN if serializer supplied directly to constructor
 -

 Key: KAFKA-2268
 URL: https://issues.apache.org/jira/browse/KAFKA-2268
 Project: Kafka
  Issue Type: Bug
  Components: producer 
Affects Versions: 0.8.2.1
Reporter: Morten Lied Johansen
Assignee: Jun Rao
Priority: Trivial

 When creating a new KafkaProducer by passing in a configuration-map, a key 
 serializer and a value serializer, two warnings are logged:
 {noformat}
 [WARN ] [2015-06-15T14:26:36,271] The configuration value.serializer = class 
 no.finntech.commons.kafka.ThriftSerializer was supplied but isn't a known 
 config. 
 [org.apache.kafka.common.config.AbstractConfig.logUnused(AbstractConfig.java:121)]
  [RMI TCP Connection(2)-127.0.0.1]
 [WARN ] [2015-06-15T14:26:36,271] The configuration key.serializer = class 
 org.apache.kafka.common.serialization.StringSerializer was supplied but isn't 
 a known config. 
 [org.apache.kafka.common.config.AbstractConfig.logUnused(AbstractConfig.java:121)]
  [RMI TCP Connection(2)-127.0.0.1]
 {noformat}
 This happens because this constructor adds the serializers to the config 
 (KafkaProducer.java:108), and then ignores that configuration since the 
 instances are already present (KafkaProducer.java:215). Finally, it checks 
 which parts of the configuration were used, and logs warnings for the 
 remaining keys (KafkaProducer.java:230).



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


[jira] [Commented] (KAFKA-2130) Resource leakage in AppInfo.scala during initialization

2015-07-27 Thread Xuan Gong (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-2130?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14643625#comment-14643625
 ] 

Xuan Gong commented on KAFKA-2130:
--

move 
{code}
stream.close();
{code}
to the finally block ?


 Resource leakage in AppInfo.scala during initialization
 ---

 Key: KAFKA-2130
 URL: https://issues.apache.org/jira/browse/KAFKA-2130
 Project: Kafka
  Issue Type: Bug
Reporter: Sebastien Zimmer
Priority: Trivial
  Labels: patch
 Attachments: patch.diff


 Minor InputStream leakage during the server initialization in AppInfo.scala. 
 Patch attached.



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


[jira] [Commented] (KAFKA-2026) Logging of unused options always shows null for the value and is misleading if the option is used by serializers

2015-07-27 Thread Xuan Gong (JIRA)

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

Xuan Gong commented on KAFKA-2026:
--

I think that the warning messages here are used to remind the users that they 
did not specify some configurations. So, instead of simply changing the value, 
we could rephrase the warning messages which include something like This 
configuration is not specified explicitly, will use the default value, etc

 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)