Return-Path: X-Original-To: apmail-hadoop-user-archive@minotaur.apache.org Delivered-To: apmail-hadoop-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6246FDAED for ; Mon, 5 Nov 2012 16:06:35 +0000 (UTC) Received: (qmail 86333 invoked by uid 500); 5 Nov 2012 16:06:30 -0000 Delivered-To: apmail-hadoop-user-archive@hadoop.apache.org Received: (qmail 86038 invoked by uid 500); 5 Nov 2012 16:06:30 -0000 Mailing-List: contact user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hadoop.apache.org Delivered-To: mailing list user@hadoop.apache.org Received: (qmail 86016 invoked by uid 99); 5 Nov 2012 16:06:29 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Nov 2012 16:06:29 +0000 X-ASF-Spam-Status: No, hits=1.7 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of liulei412@gmail.com designates 74.125.82.176 as permitted sender) Received: from [74.125.82.176] (HELO mail-we0-f176.google.com) (74.125.82.176) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Nov 2012 16:06:23 +0000 Received: by mail-we0-f176.google.com with SMTP id z53so3081873wey.35 for ; Mon, 05 Nov 2012 08:06:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=zrtLE0CjuaVgJh+fFBGGnm8co7PFqCjdpQeptWn7sew=; b=XhzHjnGc1o1COkhef8PfxjE+CSTMTCsEZtOOlROK9c1A601YnIerBB1/SsP+h7eGUe cY1ae6HuyfqA5gkCjv/4DIqBxQuQczRmYH9fPrhswtzy5XpSl8nlPXfRUFixAOyKjx2l pRNqQhiZL/ySfvk+2f/kVzGgpXBGDoXwoFGPTq77qqds3xpJLUDp9DY3dQ8w3ryP4fQd r2lFVWfCwuCb3TL0exEBMABcJGmQWs9YhJU+fyFGDNrYLDUqhc2o+Nx0A427HEzbK4bK HhNGMU7ipzuj/vkPLVlmwXE+H0RS4UeNT5qJxhnnqa21r7aKC0Uw1+GgISNurubGOJe/ lO0w== MIME-Version: 1.0 Received: by 10.216.28.140 with SMTP id g12mr3680524wea.59.1352131561794; Mon, 05 Nov 2012 08:06:01 -0800 (PST) Received: by 10.216.106.67 with HTTP; Mon, 5 Nov 2012 08:06:01 -0800 (PST) In-Reply-To: References: Date: Tue, 6 Nov 2012 00:06:01 +0800 Message-ID: Subject: Re: same edits file is loaded more than once From: lei liu To: user@hadoop.apache.org Content-Type: multipart/alternative; boundary=0016e6db71806e2bbe04cdc1a991 X-Virus-Checked: Checked by ClamAV on apache.org --0016e6db71806e2bbe04cdc1a991 Content-Type: text/plain; charset=ISO-8859-1 > I research FSEditLog.loadFSEdits method, I find OP_ADD and OP_CLOSE > opration first delete inode(call FSDirectory.unprotectedDelete method), > then re-add inode(call FSDirectory.unprotectedAddFile method), so if NN > read one OP_ADD transaction log and add one inode to namespace for the > operation, when next time NN read the same transaction log form same edits > file,NN first delete the inode , then add same inode to namespace again, > So I think this is no harmful,even if the same transaction log is loaded > more than once. > > If there are some thing wrong,please give me some advice. > > Thanks > LiuLei > > > > --0016e6db71806e2bbe04cdc1a991 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

I research FSEditLog.loadFSEdits meth= od, I find OP_ADD and OP_CLOSE opration first=A0 delete inode(call=A0 FSDir= ectory.unprotectedDelete method), then re-add inode(call FSDirectory.unprot= ectedAddFile method),=A0 so if NN read one OP_ADD transaction log and add o= ne inode to namespace=A0 for the operation, when next time NN read the same= transaction log form same edits file,NN first delete the inode , then add = same inode to namespace again,=A0 So=A0 I think this is no harmful,even if = the same transaction log is loaded more than once.

If there are some thing=A0wrong,please give me some advice.
=A0
Thanks
LiuLei=20

=A0
--0016e6db71806e2bbe04cdc1a991--