[jira] [Updated] (KAFKA-5911) Avoid creation of extra Map for futures in KafkaAdminClient
[ https://issues.apache.org/jira/browse/KAFKA-5911?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ted Yu updated KAFKA-5911: -- Labels: client (was: ) > Avoid creation of extra Map for futures in KafkaAdminClient > --- > > Key: KAFKA-5911 > URL: https://issues.apache.org/jira/browse/KAFKA-5911 > Project: Kafka > Issue Type: Bug >Reporter: Ted Yu > Labels: client > Attachments: 5911.v1.txt > > > In various methods from KafkaAdminClient, there is extra Map created when > constructing XXResult instance. > e.g. > {code} > return new DescribeReplicaLogDirResult(new > HashMap(futures)); > {code} > Prior to returning, futures Map is already filled. > Calling get() and values() does not involve the internals of HashMap when we > consider thread-safety. > The extra Map doesn't need to be created. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Updated] (KAFKA-5911) Avoid creation of extra Map for futures in KafkaAdminClient
[ https://issues.apache.org/jira/browse/KAFKA-5911?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ted Yu updated KAFKA-5911: -- Attachment: 5911.v1.txt I have run KafkaAdminClientTest thru the patch which passed. > Avoid creation of extra Map for futures in KafkaAdminClient > --- > > Key: KAFKA-5911 > URL: https://issues.apache.org/jira/browse/KAFKA-5911 > Project: Kafka > Issue Type: Bug >Reporter: Ted Yu > Attachments: 5911.v1.txt > > > In various methods from KafkaAdminClient, there is extra Map created when > constructing XXResult instance. > e.g. > {code} > return new DescribeReplicaLogDirResult(new > HashMap(futures)); > {code} > Prior to returning, futures Map is already filled. > Calling get() and values() does not involve the internals of HashMap when we > consider thread-safety. > The extra Map doesn't need to be created. -- This message was sent by Atlassian JIRA (v6.4.14#64029)