You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Ted Yu (JIRA)" <ji...@apache.org> on 2017/10/18 23:19:00 UTC

[jira] [Resolved] (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 resolved KAFKA-5911.
---------------------------
    Resolution: Later

> 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<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)