You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by "Tsz Wo (Nicholas), SZE (JIRA)" <ji...@apache.org> on 2008/05/14 01:11:57 UTC
[jira] Issue Comment Edited: (HADOOP-3310) Lease recovery for
append
[ https://issues.apache.org/jira/browse/HADOOP-3310?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12594365#action_12594365 ]
szetszwo edited comment on HADOOP-3310 at 5/13/08 4:10 PM:
-------------------------------------------------------------------------
*Lease Recovery Algorithm*
{code}
/*
* 1) Namenode retrieves lease information
* 2) For each file f in the lease, consider the last block b of f
* 2.1) Get the datanodes which contains b
* 2.2) Assign one of the datanodes as the primary datanode p
* 2.3) p obtains a new generation stamp form the namenode
* 2.4) p get the block info from each datanode
* 2.5) p computes the minimum block length
* 2.6) p updates the datanodes, which have a valid generation stamp,
* with the new generation stamp and the minimum block length
* 2.7) p acknowledges the namenode the update results
* 2.8) Namenode updates the BlockInfo
* 2.9) Namenode removes f from the lease
* and removes the lease once all files have been removed
* 2.10) Namenode commit changes to edit log
*/
{code}
was (Author: szetszwo):
The lease recovery algorithm is:
* 1) Namenode retrieves lease information
* 2) For each file f in the lease, consider the last block b of f
* 2.1) Get the datanodes which containing b
* 2.2) Assign one of the datanodes as the primary datanode p
* 2.3) p checks with all the datanodes,
* see whether block synchronization is required.
* 2.4) If synchronization is required
* 2.4.1) obtain a new generation stamp form the namenode
* 2.4.2) compute the minimum block length (this is the synchronized length)
* 2.4.3) update all datanodess (each datanode update its block file)
* 2.4.4) acknowledge the namenode.
* 2.5) Namenode commit the new generation stamp
* 2.6) Namenode removes f (and update INode) from the lease
* 3) Namenode removes the lease once all files have been removed.
> Lease recovery for append
> -------------------------
>
> Key: HADOOP-3310
> URL: https://issues.apache.org/jira/browse/HADOOP-3310
> Project: Hadoop Core
> Issue Type: New Feature
> Components: dfs
> Reporter: Tsz Wo (Nicholas), SZE
> Assignee: Tsz Wo (Nicholas), SZE
>
> In order to support file append, a GenerationStamp is associated with each block. Lease recovery will be performed when there is a possibility that the replicas of a block in a lease may have different GenerationStamp values.
> For more details, see the documentation in HADOOP-1700.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.