The Namenode maintains a lease for every open file that is being written to. If the client that was writing to the file disappears, the Namenode will do "lease recovery" after expiry of the lease timeout (1 hour). The lease recovery process (in most cases) will remove the last block from the file (it was not fully written because the client crashed before it could fill up the block) and close the file.
Thanks, dhruba -----Original Message----- From: Steve Sapovits [mailto:[EMAIL PROTECTED] Sent: Monday, February 25, 2008 5:13 PM To: [email protected] Subject: long write operations and data recovery If I have a write operation that takes a while between opening and closing the file, what is the effect of a node doing that writing crashing in the middle? For example, suppose I have large logs that I write to continually, rolling them every N minutes (say every hour for the sake of discussion). If I have the file opened and am 90% done my writes and things crash, what happens to the data I've "written" ... realizing that at some level, data isn't visible to the rest of the cluster until the file is closed. -- Steve Sapovits Invite Media - http://www.invitemedia.com [EMAIL PROTECTED]
