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

Junping Du commented on HDFS-5009:
----------------------------------

Nicholas, Thanks for addressing my comments! On sorting BlockLocation, you are 
right that we don't consider putting replica across different storage types in 
phase 1. We may consider it later after this phase. 
My additional comments are about naming:
Looks like we are aware to change name from location to storage when changing 
DatanodeDescriptor to DatanodeStorageInfo in some cases like below:
{code}
-      DatanodeDescriptor[] locations) throws IOException;
+      DatanodeStorageInfo[] storages) throws IOException;
{code}
However, in other cases, we still keep using location to represent 
DatanodeStorageInfo like below:
{code}
+      final DatanodeStorageInfo[] locations = uc.getExpectedLocations();
{code}
Also in case below, getExpectedLocation() == storage seems to be misleading.
{code}
-      if(r.getExpectedLocation() == dn)
+      if(r.getExpectedLocation() == storage)
{code}
May be we should update method name to something related to storage?
                
> NameNode should expose storage information in the LocatedBlock
> --------------------------------------------------------------
>
>                 Key: HDFS-5009
>                 URL: https://issues.apache.org/jira/browse/HDFS-5009
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: namenode
>    Affects Versions: 3.0.0
>            Reporter: Arpit Agarwal
>            Assignee: Tsz Wo (Nicholas), SZE
>         Attachments: h5009_20130830.patch, h5009_20130831.patch, 
> h5009_20130903.patch
>
>
> The storage type is optionally reported by the DataNode along with block 
> report. The NameNode should make this information available to clients via 
> LocatedBlock.
> Also, LocatedBlock is used in reportBadBlocks(..).  We should add storage ID 
> to LocatedBlock.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to