Return-Path: X-Original-To: apmail-hadoop-hdfs-commits-archive@minotaur.apache.org Delivered-To: apmail-hadoop-hdfs-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DB62910D3B for ; Wed, 13 Nov 2013 21:01:14 +0000 (UTC) Received: (qmail 68794 invoked by uid 500); 13 Nov 2013 21:01:14 -0000 Delivered-To: apmail-hadoop-hdfs-commits-archive@hadoop.apache.org Received: (qmail 68753 invoked by uid 500); 13 Nov 2013 21:01:14 -0000 Mailing-List: contact hdfs-commits-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hdfs-dev@hadoop.apache.org Delivered-To: mailing list hdfs-commits@hadoop.apache.org Received: (qmail 68745 invoked by uid 99); 13 Nov 2013 21:01:14 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Nov 2013 21:01:14 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Nov 2013 21:01:13 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 6CDCB23888A6; Wed, 13 Nov 2013 21:00:53 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1541709 - in /hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs: CHANGES.txt src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java Date: Wed, 13 Nov 2013 21:00:53 -0000 To: hdfs-commits@hadoop.apache.org From: jing9@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20131113210053.6CDCB23888A6@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: jing9 Date: Wed Nov 13 21:00:52 2013 New Revision: 1541709 URL: http://svn.apache.org/r1541709 Log: HDFS-5474. Merge change r1541685 from trunk. Modified: hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java Modified: hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt?rev=1541709&r1=1541708&r2=1541709&view=diff ============================================================================== --- hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt (original) +++ hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt Wed Nov 13 21:00:52 2013 @@ -166,6 +166,9 @@ Release 2.3.0 - UNRELEASED HDFS-5425. Renaming underconstruction file with snapshots can make NN failure on restart. (jing9 and Vinay) + HDFS-5474. Deletesnapshot can make Namenode in safemode on NN restarts. + (Sathish via jing9) + HDFS-5075. httpfs-config.sh calls out incorrect env script name (Timothy St. Clair via stevel) Modified: hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java?rev=1541709&r1=1541708&r2=1541709&view=diff ============================================================================== --- hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java (original) +++ hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java Wed Nov 13 21:00:52 2013 @@ -6919,6 +6919,7 @@ public class FSNamesystem implements Nam return; // Return previous response } boolean success = false; + BlocksMapUpdateInfo collectedBlocks = new BlocksMapUpdateInfo(); writeLock(); try { checkOperation(OperationCategory.WRITE); @@ -6927,7 +6928,6 @@ public class FSNamesystem implements Nam checkOwner(pc, snapshotRoot); } - BlocksMapUpdateInfo collectedBlocks = new BlocksMapUpdateInfo(); List removedINodes = new ChunkedArrayList(); dir.writeLock(); try { @@ -6938,8 +6938,6 @@ public class FSNamesystem implements Nam dir.writeUnlock(); } removedINodes.clear(); - this.removeBlocks(collectedBlocks); - collectedBlocks.clear(); getEditLog().logDeleteSnapshot(snapshotRoot, snapshotName, cacheEntry != null); success = true; @@ -6948,7 +6946,10 @@ public class FSNamesystem implements Nam RetryCache.setState(cacheEntry, success); } getEditLog().logSync(); - + + removeBlocks(collectedBlocks); + collectedBlocks.clear(); + if (auditLog.isInfoEnabled() && isExternalInvocation()) { String rootPath = Snapshot.getSnapshotPath(snapshotRoot, snapshotName); logAuditEvent(true, "deleteSnapshot", rootPath, null, null);