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

Arpit Agarwal commented on HDFS-7647:
-------------------------------------

bq. This poses a larger problem in that the client may expect changes to the 
datanode state to be reflected in the output of LocatedBlock.getLocations(), 
but they won't be because we create a new DatanodeInfoWithStorage object during 
construction and return it in getLocations().
I think this is a test specific problem. Clients will never get access to the 
NameNode object, instead they will have a replica constructed from the wire 
message. The test case directly calls the FSNameSystem.getBlockLocations. The 
test should be fixed to not poll the cached object but query a new one 
periodically.

> DatanodeManager.sortLocatedBlocks() sorts DatanodeInfos but not StorageIDs
> --------------------------------------------------------------------------
>
>                 Key: HDFS-7647
>                 URL: https://issues.apache.org/jira/browse/HDFS-7647
>             Project: Hadoop HDFS
>          Issue Type: Bug
>    Affects Versions: 2.6.0
>            Reporter: Milan Desai
>            Assignee: Milan Desai
>         Attachments: HDFS-7647-2.patch, HDFS-7647-3.patch, HDFS-7647-4.patch, 
> HDFS-7647.patch
>
>
> DatanodeManager.sortLocatedBlocks() sorts the array of DatanodeInfos inside 
> each LocatedBlock, but does not touch the array of StorageIDs and 
> StorageTypes. As a result, the DatanodeInfos and StorageIDs/StorageTypes are 
> mismatched. The method is called by FSNamesystem.getBlockLocations(), so the 
> client will not know which StorageID/Type corresponds to which DatanodeInfo.  



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

Reply via email to