[
https://issues.apache.org/jira/browse/HDFS-3448?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13535787#comment-13535787
]
Li Junjun commented on HDFS-3448:
---------------------------------
Sorry,i'm be familiar with jira and svn
> CLONE - Why open method in class DFSClient would compare old LocatedBlocks
> and new LocatedBlocks?
> -------------------------------------------------------------------------------------------------
>
> Key: HDFS-3448
> URL: https://issues.apache.org/jira/browse/HDFS-3448
> Project: Hadoop HDFS
> Issue Type: Wish
> Components: hdfs-client
> Affects Versions: 1.0.1
> Reporter: Li Junjun
> Assignee: Todd Lipcon
> Original Estimate: 168h
> Remaining Estimate: 168h
>
> I think there are two situations.
> 1,the file has been swapped with another file,we check the blockId,that's
> correct we throw Exceptions!
> 2,but if the file has not been swapped but has been appended ,we should just
> check the blockId ,and should not care about the block's stamp , because in
> fact we got the right and updated block list , cause file in hdfs can't be
> truncate .
> so how about we do it like this ?
> if ( oldIter.next().getBlock().getBlockId() !=
> newIter.next().getBlock().getBlockId() ) { throw new IOException("Blocklist
> for " + src + " has changed!"); }
> after all , between two calls to openInfo() the file can be swapped and then
> appending,so we should not ignore the under construction file.
--
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