hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aaron T. Myers (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-6268) Better sorting in NetworkTopology#pseudoSortByDistance when no local node is found
Date Fri, 30 May 2014 23:02:01 GMT

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

Aaron T. Myers commented on HDFS-6268:

Latest patch looks pretty good to me, Andrew. I think this is much simpler/easier to understand.

Just one small comment:

+    // Seed is normally the block id
+    // This means we use the same pseudo-random order for each block, for
+    // potentially better page cache usage.
+    r.setSeed(seed);

Note that "{{r}}" is a static variable that I think could theoretically be shared by multiple
threads when the FSNS read lock is held, in which case seems there's a race between setting
the seed and using it to shuffle the nodes at a given distance. Obviously this shouldn't do
anything to the correctness of the change, but would potentially defeat the attempt to have
some buffer cache affinity.

+1 from me once this is addressed.

> 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, hdfs-6268-3.patch, hdfs-6268-4.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

View raw message