You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "Joe Pallas (JIRA)" <ji...@apache.org> on 2015/05/12 07:51:01 UTC

[jira] [Commented] (HDFS-8361) Choose SSD over DISK in block placement

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

Joe Pallas commented on HDFS-8361:
----------------------------------

There's a typo in the test name.

The test verifies the ordering of the enum entries, but it doesn't actually verify that the policy prefers SSD over DISK.  A change to the implementation could break the behavior without failing the test.

Eventually, storage types might be characterized by more than one dimension, so a single ordering may not serve the purposes of all placement policies.

> Choose SSD over DISK in block placement
> ---------------------------------------
>
>                 Key: HDFS-8361
>                 URL: https://issues.apache.org/jira/browse/HDFS-8361
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: namenode
>            Reporter: Tsz Wo Nicholas Sze
>            Assignee: Tsz Wo Nicholas Sze
>         Attachments: h8361_20150508.patch
>
>
> BlockPlacementPolicyDefault chooses the StorageType by iterating the given StorageType EnumMap in its natural order (the order in which the enum constants are declared).  So DISK will be chosen over SSD in One-SSD policy since DISK is declared before SSD as shown below.  We should choose SSD first.
> {code}
> public enum StorageType {
>   DISK(false),
>   SSD(false),
>   ARCHIVE(false),
>   RAM_DISK(true);
>   ...
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)