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 147B318C4E for ; Tue, 22 Dec 2015 23:51:08 +0000 (UTC) Received: (qmail 20008 invoked by uid 500); 22 Dec 2015 23:51:02 -0000 Delivered-To: apmail-hadoop-common-commits-archive@hadoop.apache.org Received: (qmail 19695 invoked by uid 500); 22 Dec 2015 23:51:02 -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 19191 invoked by uid 99); 22 Dec 2015 23:51:02 -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; Tue, 22 Dec 2015 23:51:02 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id EAC1BE08DD; Tue, 22 Dec 2015 23:51:01 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: asuresh@apache.org To: common-commits@hadoop.apache.org Date: Tue, 22 Dec 2015 23:51:26 -0000 Message-Id: <74e39237a7644564883e01647773cae7@git.apache.org> In-Reply-To: <827b4547bc0e4a2685c6d00bbe27ad32@git.apache.org> References: <827b4547bc0e4a2685c6d00bbe27ad32@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [27/50] [abbrv] hadoop git commit: HDFS-9571. Fix ASF Licence warnings in Jenkins reports. Contributed by Brahma Reddy Battula. HDFS-9571. Fix ASF Licence warnings in Jenkins reports. Contributed by Brahma Reddy Battula. Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/6da9deec Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/6da9deec Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/6da9deec Branch: refs/heads/yarn-2877 Commit: 6da9deec204a4fa69dfc2d891ce934979d59b0ab Parents: 1de56b0 Author: cnauroth Authored: Thu Dec 17 16:26:01 2015 -0800 Committer: cnauroth Committed: Thu Dec 17 16:26:01 2015 -0800 ---------------------------------------------------------------------- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 3 +++ .../apache/hadoop/hdfs/TestMiniDFSCluster.java | 19 +++++++++++++------ .../TestBlocksWithNotEnoughRacks.java | 8 ++++---- .../hdfs/server/namenode/TestHostsFiles.java | 8 ++++---- 4 files changed, 24 insertions(+), 14 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hadoop/blob/6da9deec/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 f896544..4af15d9 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -2516,6 +2516,9 @@ Release 2.8.0 - UNRELEASED HDFS-9572. Prevent DataNode log spam if a client connects on the data transfer port but sends no data. (cnauroth) + HDFS-9571. Fix ASF Licence warnings in Jenkins reports + (Brahma Reddy Battula via cnauroth) + Release 2.7.3 - UNRELEASED INCOMPATIBLE CHANGES http://git-wip-us.apache.org/repos/asf/hadoop/blob/6da9deec/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestMiniDFSCluster.java ---------------------------------------------------------------------- diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestMiniDFSCluster.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestMiniDFSCluster.java index ec5895b..78ae8b1 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestMiniDFSCluster.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestMiniDFSCluster.java @@ -63,17 +63,24 @@ public class TestMiniDFSCluster { */ @Test(timeout=100000) public void testClusterWithoutSystemProperties() throws Throwable { + String oldPrp = System.getProperty(MiniDFSCluster.PROP_TEST_BUILD_DATA); System.clearProperty(MiniDFSCluster.PROP_TEST_BUILD_DATA); - Configuration conf = new HdfsConfiguration(); - File testDataCluster1 = new File(testDataPath, CLUSTER_1); - String c1Path = testDataCluster1.getAbsolutePath(); - conf.set(MiniDFSCluster.HDFS_MINIDFS_BASEDIR, c1Path); - MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).build(); + MiniDFSCluster cluster = null; try { + Configuration conf = new HdfsConfiguration(); + File testDataCluster1 = new File(testDataPath, CLUSTER_1); + String c1Path = testDataCluster1.getAbsolutePath(); + conf.set(MiniDFSCluster.HDFS_MINIDFS_BASEDIR, c1Path); + cluster = new MiniDFSCluster.Builder(conf).build(); assertEquals(new File(c1Path + "/data"), new File(cluster.getDataDirectory())); } finally { - cluster.shutdown(); + if (oldPrp != null) { + System.setProperty(MiniDFSCluster.PROP_TEST_BUILD_DATA, oldPrp); + } + if (cluster != null) { + cluster.shutdown(); + } } } http://git-wip-us.apache.org/repos/asf/hadoop/blob/6da9deec/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestBlocksWithNotEnoughRacks.java ---------------------------------------------------------------------- diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestBlocksWithNotEnoughRacks.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestBlocksWithNotEnoughRacks.java index 95f6cd8..ea994a2 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestBlocksWithNotEnoughRacks.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestBlocksWithNotEnoughRacks.java @@ -387,8 +387,8 @@ public class TestBlocksWithNotEnoughRacks { // Configure an excludes file FileSystem localFileSys = FileSystem.getLocal(conf); - Path workingDir = localFileSys.getWorkingDirectory(); - Path dir = new Path(workingDir, "build/test/data/temp/decommission"); + Path workingDir = new Path(MiniDFSCluster.getBaseDirectory()); + Path dir = new Path(workingDir, "temp/decommission"); Path excludeFile = new Path(dir, "exclude"); Path includeFile = new Path(dir, "include"); assertTrue(localFileSys.mkdirs(dir)); @@ -440,8 +440,8 @@ public class TestBlocksWithNotEnoughRacks { // Configure an excludes file FileSystem localFileSys = FileSystem.getLocal(conf); - Path workingDir = localFileSys.getWorkingDirectory(); - Path dir = new Path(workingDir, "build/test/data/temp/decommission"); + Path workingDir = new Path(MiniDFSCluster.getBaseDirectory()); + Path dir = new Path(workingDir, "temp/decommission"); Path excludeFile = new Path(dir, "exclude"); Path includeFile = new Path(dir, "include"); assertTrue(localFileSys.mkdirs(dir)); http://git-wip-us.apache.org/repos/asf/hadoop/blob/6da9deec/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestHostsFiles.java ---------------------------------------------------------------------- diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestHostsFiles.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestHostsFiles.java index a93cc2a..08ad38b 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestHostsFiles.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestHostsFiles.java @@ -83,8 +83,8 @@ public class TestHostsFiles { // Configure an excludes file FileSystem localFileSys = FileSystem.getLocal(conf); - Path workingDir = localFileSys.getWorkingDirectory(); - Path dir = new Path(workingDir, "build/test/data/temp/decommission"); + Path workingDir = new Path(MiniDFSCluster.getBaseDirectory()); + Path dir = new Path(workingDir, "temp/decommission"); Path excludeFile = new Path(dir, "exclude"); Path includeFile = new Path(dir, "include"); assertTrue(localFileSys.mkdirs(dir)); @@ -143,8 +143,8 @@ public class TestHostsFiles { // Configure an excludes file FileSystem localFileSys = FileSystem.getLocal(conf); - Path workingDir = localFileSys.getWorkingDirectory(); - Path dir = new Path(workingDir, "build/test/data/temp/decommission"); + Path workingDir = new Path(MiniDFSCluster.getBaseDirectory()); + Path dir = new Path(workingDir, "temp/decommission"); Path excludeFile = new Path(dir, "exclude"); Path includeFile = new Path(dir, "include"); assertTrue(localFileSys.mkdirs(dir));