[
https://issues.apache.org/jira/browse/HDFS-3701?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13462266#comment-13462266
]
Tsz Wo (Nicholas), SZE commented on HDFS-3701:
----------------------------------------------
- fetchLocatedBlocks() should use the return value of updateBlockInfo(..).
{code}
@@ -1965,54 +1996,77 @@
updateBlockInfo(newInfo);
this.locatedBlocks = newInfo;
this.currentNode = null;
+ return true;
}
{code}
The code above should be
{code}
@@ -1965,54 +1996,77 @@
- updateBlockInfo(newInfo);
+ boolean b = updateBlockInfo(newInfo);
this.locatedBlocks = newInfo;
this.currentNode = null;
+ return b;
}
{code}
- This is a separated issue: The following comment should be removed since the
old and new block lists must be the same even with append. Append may add new
blocks but the existing blocks must be the same. See if you also want to
remove it with the patch here.
{code}
//In fetchLocatedBlocks(),
// I think this check is not correct. A file could have been appended to
// between two calls to openInfo().
{code}
> HDFS may miss the final block when reading a file opened for writing if one
> of the datanode is dead
> ---------------------------------------------------------------------------------------------------
>
> Key: HDFS-3701
> URL: https://issues.apache.org/jira/browse/HDFS-3701
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: hdfs client
> Affects Versions: 1.0.3
> Reporter: nkeywal
> Assignee: nkeywal
> Priority: Critical
> Attachments: HDFS-3701.branch-1.v2.merged.patch,
> HDFS-3701.branch-1.v3.patch, HDFS-3701.ontopof.v1.patch, HDFS-3701.patch
>
>
> When the file is opened for writing, the DFSClient calls one of the datanode
> owning the last block to get its size. If this datanode is dead, the socket
> exception is shallowed and the size of this last block is equals to zero.
> This seems to be fixed on trunk, but I didn't find a related Jira. On 1.0.3,
> it's not fixed. It's on the same area as HDFS-1950 or HDFS-3222.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira