You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Jun Rao (JIRA)" <ji...@apache.org> on 2014/11/26 00:21:13 UTC
[jira] [Commented] (KAFKA-1799)
ProducerConfig.METRIC_REPORTER_CLASSES_CONFIG doesn't work
[ https://issues.apache.org/jira/browse/KAFKA-1799?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14225374#comment-14225374 ]
Jun Rao commented on KAFKA-1799:
--------------------------------
This is because ConfigDef.parseType() assumes that if the input is a list, it's a list of integers. However, in ProducerConfig.METRIC_REPORTER_CLASSES_CONFIG, are expecting a list of classes. So, in AbstractConfig.getConfiguredInstances(), we need to explicitly convert each string item to a class.
> ProducerConfig.METRIC_REPORTER_CLASSES_CONFIG doesn't work
> ----------------------------------------------------------
>
> Key: KAFKA-1799
> URL: https://issues.apache.org/jira/browse/KAFKA-1799
> Project: Kafka
> Issue Type: Bug
> Affects Versions: 0.8.2
> Reporter: Jun Rao
> Labels: newbie++
> Fix For: 0.8.2
>
>
> When running the following test, we got an unknown configuration exception.
> @Test
> public void testMetricsReporter() {
> Properties producerProps = new Properties();
> producerProps.put(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG, "host1:123");
> producerProps.put(ProducerConfig.METRIC_REPORTER_CLASSES_CONFIG, "org.apache.kafka.clients.producer.new-metrics-reporter");
> new KafkaProducer(producerProps);
> }
> org.apache.kafka.common.config.ConfigException: Unknown configuration 'org.apache.kafka.clients.producer.new-metrics-reporter'
> at org.apache.kafka.common.config.AbstractConfig.get(AbstractConfig.java:60)
> at org.apache.kafka.common.config.AbstractConfig.getClass(AbstractConfig.java:91)
> at org.apache.kafka.common.config.AbstractConfig.getConfiguredInstances(AbstractConfig.java:147)
> at org.apache.kafka.clients.producer.KafkaProducer.<init>(KafkaProducer.java:105)
> at org.apache.kafka.clients.producer.KafkaProducer.<init>(KafkaProducer.java:94)
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)