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/09/15 19:31:00 UTC

[jira] [Created] (KAFKA-5911) Avoid creation of extra Map for futures in KafkaAdminClient

Ted Yu created KAFKA-5911:
-----------------------------

             Summary: 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


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)