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

Rakesh R commented on HDFS-9918:
--------------------------------

Thanks [~zhz] for listing the sort dimensions and makes it more clear.

Thanks [~walter.k.su], could you please let me know your comment on this,
bq. And, If the sorting priority is 2,1, we can reuse DecomStaleComparator.
Assume in the below list 0, 1, 7, 8 is decommissioned and extra redundant index 
is1.
{code}
0, 1, 2, 3, 4, 5, 6, 7, 8, 0, 1, 7, 8, 1
{code}

After sorting using a comparator the list will be,
{code}
2, 3, 4, 5, 6, 0, 1, 7, 8, 1, 0, 1, 7, 8
{code}

Like you mentioned, here the equal elements will not be reordered as a result 
of the sort. But the unequal elements will get randomized.

With the previous proposed approach - (step-1) add all non-decommn (step-2) add 
all decommn locs, indices will be in sorted order like,
{code}
0, 1, 1, 2, 3, 4, 5, 6, 7, 8, 0, 1, 7, 8
{code}
Do you agree to maintain the ascending order of the block indices? If yes, how 
about going ahead with the previous approach? Perhaps needs to add extra logic, 
to sort the locations with same block Index based on their stale interval. In 
the above case, the locations of {{1, 1,}} needs to be re-arranged based on 
their stale interval.

> Erasure Coding: Sort located striped blocks based on decommissioned states
> --------------------------------------------------------------------------
>
>                 Key: HDFS-9918
>                 URL: https://issues.apache.org/jira/browse/HDFS-9918
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>            Reporter: Rakesh R
>            Assignee: Rakesh R
>         Attachments: HDFS-9918-001.patch, HDFS-9918-002.patch, 
> HDFS-9918-003.patch, HDFS-9918-004.patch, HDFS-9918-005.patch, 
> HDFS-9918-006.patch, HDFS-9918-007.patch
>
>
> This jira is a follow-on work of HDFS-8786, where we do decommissioning of 
> datanodes having striped blocks.
> Now, after decommissioning it requires to change the ordering of the storage 
> list so that the decommissioned datanodes should only be last node in list.
> For example, assume we have a block group with storage list:-
> d0, d1, d2, d3, d4, d5, d6, d7, d8, d9
> mapping to indices
> 0, 1, 2, 3, 4, 5, 6, 7, 8, 2
> Here the internal block b2 is duplicated, locating in d2 and d9. If d2 is a 
> decommissioning node then should switch d2 and d9 in the storage list.
> Thanks [~jingzhao] for the 
> [discussions|https://issues.apache.org/jira/browse/HDFS-8786?focusedCommentId=15180415&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15180415]



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

Reply via email to