Return-Path: X-Original-To: apmail-hadoop-common-commits-archive@www.apache.org Delivered-To: apmail-hadoop-common-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 236A81801D for ; Thu, 29 Oct 2015 18:30:56 +0000 (UTC) Received: (qmail 84228 invoked by uid 500); 29 Oct 2015 18:30:55 -0000 Delivered-To: apmail-hadoop-common-commits-archive@hadoop.apache.org Received: (qmail 84162 invoked by uid 500); 29 Oct 2015 18:30:55 -0000 Mailing-List: contact common-commits-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: common-dev@hadoop.apache.org Delivered-To: mailing list common-commits@hadoop.apache.org Received: (qmail 84153 invoked by uid 99); 29 Oct 2015 18:30:55 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Oct 2015 18:30:55 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id B9099E3926; Thu, 29 Oct 2015 18:30:55 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: wang@apache.org To: common-commits@hadoop.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: hadoop git commit: HDFS-9332. Fix Precondition failures from NameNodeEditLogRoller while saving namespace. Date: Thu, 29 Oct 2015 18:30:55 +0000 (UTC) Repository: hadoop Updated Branches: refs/heads/trunk 8def51a70 -> 888c6245e HDFS-9332. Fix Precondition failures from NameNodeEditLogRoller while saving namespace. Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/888c6245 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/888c6245 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/888c6245 Branch: refs/heads/trunk Commit: 888c6245e20ba6bdaa57d16b5c62b4a9eda2cdaf Parents: 8def51a Author: Andrew Wang Authored: Thu Oct 29 11:30:47 2015 -0700 Committer: Andrew Wang Committed: Thu Oct 29 11:30:47 2015 -0700 ---------------------------------------------------------------------- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 3 +++ .../org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java | 4 +--- 2 files changed, 4 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hadoop/blob/888c6245/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt ---------------------------------------------------------------------- diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 36a70b8..fd1d6de 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -2196,6 +2196,9 @@ Release 2.8.0 - UNRELEASED HDFS-9044. Give Priority to FavouredNodes , before selecting nodes from FavouredNode's Node Group (J.Andreina via vinayakumarb) + HDFS-9332. Fix Precondition failures from NameNodeEditLogRoller while + saving namespace. (wang) + Release 2.7.2 - UNRELEASED INCOMPATIBLE CHANGES http://git-wip-us.apache.org/repos/asf/hadoop/blob/888c6245/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java ---------------------------------------------------------------------- diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java index 29ee087..8d70fbc 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java @@ -3729,9 +3729,7 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean, public void run() { while (fsRunning && shouldRun) { try { - FSEditLog editLog = getFSImage().getEditLog(); - long numEdits = - editLog.getLastWrittenTxId() - editLog.getCurSegmentTxId(); + long numEdits = getTransactionsSinceLastLogRoll(); if (numEdits > rollThreshold) { FSNamesystem.LOG.info("NameNode rolling its own edit log because" + " number of edits in open segment exceeds threshold of "