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

Ayush Saxena commented on HDFS-14266:
-------------------------------------

Thanx [~Harsha1206] for reporting. The reason for failure the BlockInfo is 
extended by BlockInfoContiguous and BlockInfoStriped and both have different 
way for removeStorage() method. Each while removing sets the storage to null 
but in contiguous it sets that null to end of array but in stripped since the 
block position matter we don't set that to end. It is there intact in its 
position.

So here in :

{code:java}
    for(int idx = (blockInfo.numNodes()-1); idx >= 0; idx--) {
        DatanodeDescriptor dn = blockInfo.getDatanode(idx);
{code}

This doesn't work since in striped the null storage aren't at end. but in 
middle. So it returns null.

Uploaded patch with fix.

Pls Review!!!


> EC : Unable To Get Datanode Info for EC Blocks if One Block Is Not Available.
> -----------------------------------------------------------------------------
>
>                 Key: HDFS-14266
>                 URL: https://issues.apache.org/jira/browse/HDFS-14266
>             Project: Hadoop HDFS
>          Issue Type: Bug
>    Affects Versions: 3.1.1
>            Reporter: Harshakiran Reddy
>            Assignee: Ayush Saxena
>            Priority: Major
>              Labels: EC
>         Attachments: HDFS-14266-01.patch
>
>
> If one block gets removed from the block group then the datanode information 
> for the block group comes shows null.
>  
> {noformat}
> Block Id: blk_-9223372036854775792
> Block belongs to: /ec/file1
> No. of Expected Replica: 2
> No. of live Replica: 2
> No. of excess Replica: 0
> No. of stale Replica: 0
> No. of decommissioned Replica: 0
> No. of decommissioning Replica: 0
> No. of corrupted Replica: 0
> null
> Fsck on blockId 'blk_-9223372036854775792
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to