[ 
https://issues.apache.org/jira/browse/HIVE-13667?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15849561#comment-15849561
 ] 

Siddharth Seth commented on HIVE-13667:
---------------------------------------

The hascode and equals can use the worker identity alone. Does not need to be 
all the fields. More efficient and, I'm not completely sure about the 
correctness of Objects.hashCode in this case (ServiceRecord does not implement 
a hashCode or equals)
{code}
public String getWorkerIdentity() {
      com.google.common.base.Objects.hashCode(srv, null);
      return srv.get(UNIQUE_IDENTIFIER);
    }
{code}

> Improve performance for ServiceInstanceSet.getByHost
> ----------------------------------------------------
>
>                 Key: HIVE-13667
>                 URL: https://issues.apache.org/jira/browse/HIVE-13667
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: Siddharth Seth
>            Assignee: Rajesh Balamohan
>         Attachments: HIVE-13667.1.patch, HIVE-13667.2.patch
>
>
> ServiceInstanceSet.getByHost is used for scheduling local tasks as well as 
> constructing the log URL.
> It ends up traversing all hosts on each lookup. This should be avoided.
> cc [~prasanth_j]



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to