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

Walter Su commented on HDFS-9255:
---------------------------------

The old way trims the invalid targets, shrinks the array ( by using a tmp 
ArrayList).
In the patch, I want to replace the invalid targets, or EMPTY targets with 
{{null}}, but don't shrinks the array. (So {{trimmedStorages}} is not a proper 
name here?)

Short story, they are for striped block.
Long story, {{UC.replicas}} are sorted in the order of block index, so as the 
{{newTargets}} sent by Client/DN. So we don't have to extend 
{{updatePipeline(..)}} or {{commitBlockSynchronization(..)}} protocol to send 
indices\[\]. A missing block is {{null}} in the {{newTargets}} slot, in this 
way we know its index.
A little awkward here...hmm...Thanks for deeply looking. Maybe it's 
inappropriate to keep the changes here, and I should keep the changes in 
HDFS-9173, how do you think?

> Consolidate block recovery related implementation into a single class
> ---------------------------------------------------------------------
>
>                 Key: HDFS-9255
>                 URL: https://issues.apache.org/jira/browse/HDFS-9255
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: datanode
>            Reporter: Walter Su
>            Assignee: Walter Su
>            Priority: Minor
>         Attachments: HDFS-9255.01.patch, HDFS-9255.02.patch, 
> HDFS-9255.03.patch, HDFS-9255.04.patch
>
>




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

Reply via email to