Return-Path: X-Original-To: apmail-hadoop-hdfs-user-archive@minotaur.apache.org Delivered-To: apmail-hadoop-hdfs-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 6F74FD6BC for ; Tue, 13 Nov 2012 11:26:33 +0000 (UTC) Received: (qmail 43361 invoked by uid 500); 13 Nov 2012 11:26:28 -0000 Delivered-To: apmail-hadoop-hdfs-user-archive@hadoop.apache.org Received: (qmail 43258 invoked by uid 500); 13 Nov 2012 11:26:28 -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 43239 invoked by uid 99); 13 Nov 2012 11:26:27 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Nov 2012 11:26:27 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [125.215.199.158] (HELO mail.mediator.com.hk) (125.215.199.158) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Nov 2012 11:26:18 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.mediator.com.hk (Postfix) with ESMTP id 3C24EA20431 for ; Tue, 13 Nov 2012 19:39:20 +0800 (HKT) X-Virus-Scanned: amavisd-new at mediator.com.hk Received: from mail.mediator.com.hk ([127.0.0.1]) by localhost (mail.mediator.com.hk [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xJ-N0K2mj6dB; Tue, 13 Nov 2012 19:39:19 +0800 (HKT) Received: from [192.168.0.102] (014136185055.ctinets.com [14.136.185.55]) by mail.mediator.com.hk (Postfix) with ESMTPSA id 35EB7A20430; Tue, 13 Nov 2012 19:39:19 +0800 (HKT) Subject: Re: HA for hadoop-0.20.2 Mime-Version: 1.0 (Apple Message framework v1085) Content-Type: text/plain; charset=utf-8 From: "ac@hsk.hk" In-Reply-To: Date: Tue, 13 Nov 2012 19:25:52 +0800 Cc: "ac@hsk.hk" Content-Transfer-Encoding: quoted-printable Message-Id: References: To: user@hadoop.apache.org X-Mailer: Apple Mail (2.1085) X-Virus-Checked: Checked by ClamAV on apache.org Hi, A question, is 2.x ready for production deployment? Thanks On 13 Nov 2012, at 5:19 PM, Harsh J wrote: > Hi, >=20 > Why not just use the 2.x releases for HA-NNs? There is quite a wide > delta between 0.20.x and 2.x, especially around the edit log areas > after HDFS-1073. >=20 > In any case, I think your question suits hdfs-dev@hadoop.apache.org > more than the user lists, although I don't quite understand what > you're attempting to do (or point). >=20 > On Tue, Nov 13, 2012 at 2:18 PM, lei liu wrote: >> I want to implement HA function for hadoop-0.20.2. >>=20 >> When I learn the hadoop-2.0 code, I meet some question like this: >>=20 >> Thera are below code in FSEditLogLoader.loadEditRecords method. >>=20 >> if (op.hasTransactionId()) { >> if (op.getTransactionId() > expectedTxId) { >> MetaRecoveryContext.editLogLoaderPrompt("There appears " = + >> "to be a gap in the edit log. We expected txid " + >> expectedTxId + ", but got txid " + >> op.getTransactionId() + ".", recovery, "ignoring = missing " >> + >> " transaction IDs"); >> } else if (op.getTransactionId() < expectedTxId) { >> MetaRecoveryContext.editLogLoaderPrompt("There appears " = + >> "to be an out-of-order edit in the edit log. We " + >> "expected txid " + expectedTxId + ", but got txid " = + >> op.getTransactionId() + ".", recovery, >> "skipping the out-of-order edit"); >> continue; >> } >> } >>=20 >> The method use transaction id to guarantee same transaction log is = not >> applied to namespace more than once. >>=20 >> But in hadoop-0.20.2, FSEditLog don't store the transaction id into = edits >> log file. So I want to know if StandbyNN apply same transaction log = to >> namespace more than once, that will lead to the namespace of = StandbyNN is >> corrupt? >>=20 >> Please give me some advice=EF=BC=8CThanks. >>=20 >>=20 >>=20 >> Best Regards >>=20 >> LiuLei >=20 >=20 >=20 > --=20 > Harsh J