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

Aaron T. Myers commented on HDFS-6268:
--------------------------------------

The latest patch looks good to me. +1 pending answers to Yongjun's questions.

I do have one high-level comment, though feel free to ignore it: I do wonder if 
all of {{pseudoSortByDistance}} couldn't be fairly substantially simplified by 
first separating the input nodes into separate lists of 
local/rack-local/non-rack-local nodes, and then once that's done constructing a 
new list by pulling from these separate lists in the appropriate order, and 
potentially shuffling the latter two lists as is the goal of this JIRA. I 
suspect the code could be made much more readable if we were to do it that way, 
and now might be a decent time to do it since this is a fairly substantial 
rewrite of this method.

> Better sorting in NetworkTopology#pseudoSortByDistance when no local node is 
> found
> ----------------------------------------------------------------------------------
>
>                 Key: HDFS-6268
>                 URL: https://issues.apache.org/jira/browse/HDFS-6268
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>    Affects Versions: 2.4.0
>            Reporter: Andrew Wang
>            Assignee: Andrew Wang
>            Priority: Minor
>         Attachments: hdfs-6268-1.patch, hdfs-6268-2.patch
>
>
> In NetworkTopology#pseudoSortByDistance, if no local node is found, it will 
> always place the first rack local node in the list in front.
> This became an issue when a dataset was loaded from a single datanode. This 
> datanode ended up being the first replica for all the blocks in the dataset. 
> When running an Impala query, the non-local reads when reading past a block 
> boundary were all hitting this node, meaning massive load skew.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to