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

Vinayakumar B commented on HDFS-7924:
-------------------------------------

As per HDFS-4516 fix, if the block failed to create in DNs, then locs will be 
empty and length of the block will be 0.
{code}      if (uc.getNumExpectedLocations() == 0 && uc.getNumBytes() == 0) {
        // There is no datanode reported to this block.
        // may be client have crashed before writing data to pipeline.
        // This blocks doesn't need any recovery.
        // We can remove this block and close the file.
        pendingFile.removeLastBlock(lastBlock);
        finalizeINodeFileUnderConstruction(src, pendingFile,
            iip.getLatestSnapshotId());
        NameNode.stateChangeLog.warn("BLOCK* internalReleaseLease: "
            + "Removed empty last block and closed file.");
        return true;
      }{code}
I think your case might be little different. Unfortunately no details are 
available.

> NameNode goes into infinite lease recovery
> ------------------------------------------
>
>                 Key: HDFS-7924
>                 URL: https://issues.apache.org/jira/browse/HDFS-7924
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: hdfs-client, namenode
>    Affects Versions: 2.6.0
>            Reporter: Arpit Agarwal
>            Assignee: Yi Liu
>
> We encountered an HDFS lease recovery issue. All DataNodes+NameNodes were 
> restarted while a client was running. A block was created on the NN but it 
> had not yet been created on DNs. The NN tried to recover the lease for the 
> block on restart but was unable to do so getting into an infinite loop.



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

Reply via email to