[ 
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<TopicPartitionReplica, KafkaFuture<ReplicaLogDirInfo>>(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)

Reply via email to