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

Stephen O'Donnell commented on HDFS-15255:
------------------------------------------

For the doc comment, I think you should mention the parameter it is not 
compatible with, and also add a bit more information about what this feature 
does eg:

{quote}
Decide if sort block locations considers the target's storage type or not when 
read. Any locations with the same network distance are sorted in order of the 
storage speed, fastest first (RAM, SSD, Disk, Archive). This is disabled by 
default, and the locations will be ordered randomly.
It is not possible to enable this feature along with 
dfs.namenode.read.considerLoad as only one sort can be enabled at a time.
{quote}

We should also add a similar line to dfs.namenode.read.considerLoad mentioning 
this parameter, so it is clear in both places.

I also wonder if we should enforce this restriction in the code, or at least 
log a warning if both are set?

I am not sure about how to fix the findbugs warning. It could be worth trying 
changing this line in CacheManager.java:

{code}
      for (DatanodeInfo loc : block.getLocations()) {

to

      for (DatanodeInfoWithStorage loc : block.getLocations()) {
{code}

And see if it still flags the problem then.

> Consider StorageType when DatanodeManager#sortLocatedBlock()
> ------------------------------------------------------------
>
>                 Key: HDFS-15255
>                 URL: https://issues.apache.org/jira/browse/HDFS-15255
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>            Reporter: Lisheng Sun
>            Assignee: Lisheng Sun
>            Priority: Major
>         Attachments: HDFS-15255.001.patch, HDFS-15255.002.patch, 
> HDFS-15255.003.patch
>
>
> When only one replica of a block is SDD, the others are HDD. 
> When the client reads the data, the current logic is that it considers the 
> distance between the client and the dn. I think it should also consider the 
> StorageType of the replica. Priority to return a replica of the specified 
> StorageType



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to