[ 
https://issues.apache.org/jira/browse/HADOOP-1155?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12489222
 ] 

Tom White commented on HADOOP-1155:
-----------------------------------

Following the comments in HADOOP-1256, it would be good to have some benchmarks 
to show the performance gains for this optimization.

And on the naming point, I'm struggling to come up with a better name too - but 
you could justify sortByDistance as being perfectly acceptable for a certain 
definition of "distance". Mathematicians make up all kinds of distance metrics, 
and that's what's being done here too with the the local rack being given a 
privileged role. Furthermore one could imagine other optimizations that come up 
with a different sort order, so the name needs to describe the intent, not the 
algorithm too closely (disqualifying things like "swapLocalNodesToTop").

> Additional performance improvement to chooseTarget
> --------------------------------------------------
>
>                 Key: HADOOP-1155
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1155
>             Project: Hadoop
>          Issue Type: Improvement
>          Components: dfs
>    Affects Versions: 0.12.2
>            Reporter: Hairong Kuang
>         Assigned To: Hairong Kuang
>             Fix For: 0.13.0
>
>         Attachments: rackMap.patch, rackMap1.patch, rackMap2.patch, 
> rackMap3.patch
>
>
> A few additional thoughts to improve the performance of chooseTarget:
> 1. Reduce the # of calls to getDistance in sortedByDistance
> 2. Improve the performance of getNode by adding a rack name to rack node map

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to