You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Ismael Juma (Jira)" <ji...@apache.org> on 2021/02/23 14:18:00 UTC
[jira] [Updated] (KAFKA-12235) ZkAdminManager.describeConfigs
returns no config when 2+ configuration keys are specified
[ https://issues.apache.org/jira/browse/KAFKA-12235?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ismael Juma updated KAFKA-12235:
--------------------------------
Fix Version/s: 2.8.0
> ZkAdminManager.describeConfigs returns no config when 2+ configuration keys are specified
> -----------------------------------------------------------------------------------------
>
> Key: KAFKA-12235
> URL: https://issues.apache.org/jira/browse/KAFKA-12235
> Project: Kafka
> Issue Type: Bug
> Components: core
> Affects Versions: 2.7.0
> Reporter: Ivan Yurchenko
> Assignee: Ivan Yurchenko
> Priority: Major
> Fix For: 2.8.0
>
>
> When {{ZkAdminManager.describeConfigs}} receives {{DescribeConfigsResource}} with 2 or more {{configurationKeys}} specified, it returns an empty configuration.
> Here's a test for {{ZkAdminManagerTest}} that reproduces this issue:
>
> {code:scala}
> @Test
> def testDescribeConfigsWithConfigurationKeys(): Unit = {
> EasyMock.expect(zkClient.getEntityConfigs(ConfigType.Topic, topic)).andReturn(TestUtils.createBrokerConfig(brokerId, "zk"))
> EasyMock.expect(metadataCache.contains(topic)).andReturn(true)
> EasyMock.replay(zkClient, metadataCache)
> val resources = List(new DescribeConfigsRequestData.DescribeConfigsResource()
> .setResourceName(topic)
> .setResourceType(ConfigResource.Type.TOPIC.id)
> .setConfigurationKeys(List("retention.ms", "retention.bytes", "segment.bytes").asJava)
> )
> val adminManager = createAdminManager()
> val results: List[DescribeConfigsResponseData.DescribeConfigsResult] = adminManager.describeConfigs(resources, true, true)
> assertEquals(Errors.NONE.code, results.head.errorCode())
> val resultConfigKeys = results.head.configs().asScala.map(r => r.name()).toSet
> assertEquals(Set("retention.ms", "retention.bytes", "segment.bytes"), resultConfigKeys)
> }
> {code}
> Works fine with one configuration key, though.
> The patch is following shortly.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)