From f052976ff1c80adf1a0d4709603ac5b9cbfc60ab Mon Sep 17 00:00:00 2001 From: Akira Ajisaka Date: Wed, 10 May 2017 14:17:00 -0500 Subject: [PATCH] HDFS-11795. Fix ASF License warnings in branch-2.7. Contributed by Yiqun Lin. --- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 9 ++++++--- .../blockmanagement/TestBlocksWithNotEnoughRacks.java | 4 ++-- .../hadoop/hdfs/server/namenode/TestHostsFiles.java | 4 ++-- .../hadoop/hdfs/server/namenode/TestNameNodeMXBean.java | 3 +-- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index ce225d9f71e..6af4a0f7ec8 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -265,9 +265,12 @@ Release 2.7.4 - UNRELEASED HDFS-11766. Fix findbugs warning in branch-2.7. (Chen Liang via aajisaka) - HDFS-11373. Backport HDFS-11258 and HDFS-11272 - (File mtime change could not save to editlog). - (Contributed by Jimmy Xiang, backported by Akira Ajisaka) + HDFS-11373. Backport HDFS-11258 and HDFS-11272 + (File mtime change could not save to editlog). + (Contributed by Jimmy Xiang, backported by Akira Ajisaka) + + HDFS-11795. Fix ASF License warnings in branch-2.7. + (Yiqun Lin via aajisaka) Release 2.7.3 - 2016-08-25 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 1bc7cdce4ff..2636a099b8a 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,7 +387,7 @@ public void testNodeDecomissionRespectsRackPolicy() throws Exception { // Configure an excludes file FileSystem localFileSys = FileSystem.getLocal(conf); Path workingDir = localFileSys.getWorkingDirectory(); - Path dir = new Path(workingDir, "build/test/data/temp/decommission"); + Path dir = new Path(workingDir, MiniDFSCluster.getBaseDirectory()); Path excludeFile = new Path(dir, "exclude"); Path includeFile = new Path(dir, "include"); assertTrue(localFileSys.mkdirs(dir)); @@ -440,7 +440,7 @@ public void testNodeDecomissionWithOverreplicationRespectsRackPolicy() // Configure an excludes file FileSystem localFileSys = FileSystem.getLocal(conf); Path workingDir = localFileSys.getWorkingDirectory(); - Path dir = new Path(workingDir, "build/test/data/temp/decommission"); + Path dir = new Path(workingDir, MiniDFSCluster.getBaseDirectory()); Path excludeFile = new Path(dir, "exclude"); Path includeFile = new Path(dir, "include"); assertTrue(localFileSys.mkdirs(dir)); 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 d8a6f815375..70f73dca6fc 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 @@ -82,7 +82,7 @@ public void testHostsExcludeInUI() throws Exception { // Configure an excludes file FileSystem localFileSys = FileSystem.getLocal(conf); Path workingDir = localFileSys.getWorkingDirectory(); - Path dir = new Path(workingDir, "build/test/data/temp/decommission"); + Path dir = new Path(workingDir, MiniDFSCluster.getBaseDirectory()); Path excludeFile = new Path(dir, "exclude"); Path includeFile = new Path(dir, "include"); assertTrue(localFileSys.mkdirs(dir)); @@ -137,7 +137,7 @@ public void testHostsIncludeForDeadCount() throws Exception { // Configure an excludes file FileSystem localFileSys = FileSystem.getLocal(conf); Path workingDir = localFileSys.getWorkingDirectory(); - Path dir = new Path(workingDir, "build/test/data/temp/decommission"); + Path dir = new Path(workingDir, MiniDFSCluster.getBaseDirectory()); Path excludeFile = new Path(dir, "exclude"); Path includeFile = new Path(dir, "include"); assertTrue(localFileSys.mkdirs(dir)); diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestNameNodeMXBean.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestNameNodeMXBean.java index d1e56734abd..f38eb3659f1 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestNameNodeMXBean.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestNameNodeMXBean.java @@ -228,8 +228,7 @@ public void testLastContactTime() throws Exception { // Define include file to generate deadNodes metrics FileSystem localFileSys = FileSystem.getLocal(conf); Path workingDir = localFileSys.getWorkingDirectory(); - Path dir = new Path(workingDir, - "build/test/data/temp/TestNameNodeMXBean"); + Path dir = new Path(workingDir, MiniDFSCluster.getBaseDirectory()); Path includeFile = new Path(dir, "include"); assertTrue(localFileSys.mkdirs(dir)); StringBuilder includeHosts = new StringBuilder();