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

Arpit Agarwal commented on HDFS-6702:
-------------------------------------

bq.  If we choose (a) then the index of targets and targetStorageTypes won't be 
matched in the receiver side since targets[1..n-1] becomes targets[0..n-2] and 
targetStorageTypes[0..n-1] remains targetStorageTypes[0..n-1], i.e. 
targetStorageTypes[0] is for the first DN, targetStorageTypes[1] is for the 
second DN and so on but targets[0] is for the second DN, targets[1] is for the 
third DN and so on.
Okay I got it, this trick avoids special case code in {{writeBlock}}. Would you 
consider adding a short comment explaining this?

bq. It is an two-dimensional array, which is similar to targetStorageUuids or 
targets in BlockCommandProto.
Got it thanks.

+1

> DFSClient should create blocks using StorageType 
> -------------------------------------------------
>
>                 Key: HDFS-6702
>                 URL: https://issues.apache.org/jira/browse/HDFS-6702
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: datanode, hdfs-client
>            Reporter: Tsz Wo Nicholas Sze
>            Assignee: Tsz Wo Nicholas Sze
>         Attachments: h6702_20140719.patch, h6702_20140721.patch, 
> h6702_20140721b.patch
>
>
> When DFSClient asks NN for a new block (via addBlock), NN returns a 
> LocatedBlock with storage type information.  However, DFSClient does not use 
> StorageType to create blocks with DN.  As a result, the block replicas could 
> possibly be created with a different storage type.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to