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 3743C1762D for ; Thu, 6 Nov 2014 08:04:34 +0000 (UTC) Received: (qmail 75438 invoked by uid 500); 6 Nov 2014 08:04:14 -0000 Delivered-To: apmail-hadoop-common-commits-archive@hadoop.apache.org Received: (qmail 75237 invoked by uid 500); 6 Nov 2014 08:04:14 -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 74107 invoked by uid 99); 6 Nov 2014 08:04:13 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Nov 2014 08:04:13 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 834D6930C2A; Thu, 6 Nov 2014 08:04:13 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: vinayakumarb@apache.org To: common-commits@hadoop.apache.org Date: Thu, 06 Nov 2014 08:04:49 -0000 Message-Id: <248499d2a2bc4c99a53a0a2b1176f217@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [38/43] git commit: HDFS-7361. TestCheckpoint fails after change of log message related to locking violation. Contributed by Konstantin Shvachko. HDFS-7361. TestCheckpoint fails after change of log message related to locking violation. Contributed by Konstantin Shvachko. Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/240cb59b Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/240cb59b Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/240cb59b Branch: refs/heads/HDFS-EC Commit: 240cb59b9fb6841c64a47c6797c605a454f7b47f Parents: e4b4901 Author: Konstantin V Shvachko Authored: Wed Nov 5 20:14:28 2014 -0800 Committer: Konstantin V Shvachko Committed: Wed Nov 5 20:15:16 2014 -0800 ---------------------------------------------------------------------- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 7 +++++-- .../hadoop/hdfs/server/namenode/TestCheckpoint.java | 10 ++++++---- 2 files changed, 11 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hadoop/blob/240cb59b/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 6ec8199..c6e848f 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -333,13 +333,16 @@ Release 2.7.0 - UNRELEASED HDFS-7356. Use DirectoryListing.hasMore() directly in nfs. (Li Lu via jing9) + HDFS-7357. FSNamesystem.checkFileProgress should log file path. + (Tsz Wo Nicholas Sze via wheat9) + HDFS-7335. Redundant checkOperation() in FSN.analyzeFileState(). (Milan Desai via shv) HDFS-7333. Improve logging in Storage.tryLock(). (shv) - HDFS-7357. FSNamesystem.checkFileProgress should log file path. - (Tsz Wo Nicholas Sze via wheat9) + HDFS-7361. TestCheckpoint fails after change of log message related to + locking violation. (shv) OPTIMIZATIONS http://git-wip-us.apache.org/repos/asf/hadoop/blob/240cb59b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestCheckpoint.java ---------------------------------------------------------------------- diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestCheckpoint.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestCheckpoint.java index d51c1cc..bb4689d 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestCheckpoint.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestCheckpoint.java @@ -837,7 +837,7 @@ public class TestCheckpoint { } /** - * Test that, an attempt to lock a storage that is already locked by a nodename, + * Test that, an attempt to lock a storage that is already locked by nodename, * logs error message that includes JVM name of the namenode that locked it. */ @Test @@ -853,16 +853,18 @@ public class TestCheckpoint { savedSd = sd; } - LogCapturer logs = GenericTestUtils.LogCapturer.captureLogs(LogFactory.getLog(Storage.class)); + LogCapturer logs = GenericTestUtils.LogCapturer.captureLogs( + LogFactory.getLog(Storage.class)); try { // try to lock the storage that's already locked savedSd.lock(); - fail("Namenode should not be able to lock a storage that is already locked"); + fail("Namenode should not be able to lock a storage" + + " that is already locked"); } catch (IOException ioe) { // cannot read lock file on Windows, so message cannot get JVM name String lockingJvmName = Path.WINDOWS ? "" : " " + ManagementFactory.getRuntimeMXBean().getName(); - String expectedLogMessage = "It appears that another namenode" + String expectedLogMessage = "It appears that another node " + lockingJvmName + " has already locked the storage directory"; assertTrue("Log output does not contain expected log message: " + expectedLogMessage, logs.getOutput().contains(expectedLogMessage));