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

Milan Desai commented on HDFS-7647:
-----------------------------------

There are a couple of ways to go about fixing this. The simplest is to map the 
DatanodeIDs to storageIDs and use the map to regenerate the arrays after 
sorting the DatanodeIDs. A more efficient solution may be to have LocatedBlock 
store an array of data structures that wrap a DatanodeID and a DatanodeStorage, 
but that would be a massive change.

> DatanodeManager.sortLocatedBlocks() sorts DatanodeIDs 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
>
> DatanodeManager.sortLocatedBlocks() sorts the array of DatanodeIDs inside 
> each LocatedBlock, but does not touch the array of StorageIDs and 
> StorageTypes. As a result, the DatanodeIDs and StorageIDs/StorageTypes are 
> mismatched. The method is called by FSNamesystem.getBlockLocations(), so the 
> client will not know which StorageID/Type corresponds to which DatanodeID.



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

Reply via email to