HDFS-9571. Fix ASF Licence warnings in Jenkins reports. Contributed by Brahma Reddy Battula.

(cherry picked from commit 6da9deec20)
(cherry picked from commit 7e5306e795)
This commit is contained in:
cnauroth 2015-12-17 16:26:01 -08:00
parent e5e5ba495f
commit 9a6814f37c
4 changed files with 24 additions and 14 deletions

View File

@ -1603,6 +1603,9 @@ Release 2.8.0 - UNRELEASED
HDFS-9572. Prevent DataNode log spam if a client connects on the data HDFS-9572. Prevent DataNode log spam if a client connects on the data
transfer port but sends no data. (cnauroth) 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 Release 2.7.3 - UNRELEASED
INCOMPATIBLE CHANGES INCOMPATIBLE CHANGES

View File

@ -63,19 +63,26 @@ public class TestMiniDFSCluster {
*/ */
@Test(timeout=100000) @Test(timeout=100000)
public void testClusterWithoutSystemProperties() throws Throwable { public void testClusterWithoutSystemProperties() throws Throwable {
String oldPrp = System.getProperty(MiniDFSCluster.PROP_TEST_BUILD_DATA);
System.clearProperty(MiniDFSCluster.PROP_TEST_BUILD_DATA); System.clearProperty(MiniDFSCluster.PROP_TEST_BUILD_DATA);
MiniDFSCluster cluster = null;
try {
Configuration conf = new HdfsConfiguration(); Configuration conf = new HdfsConfiguration();
File testDataCluster1 = new File(testDataPath, CLUSTER_1); File testDataCluster1 = new File(testDataPath, CLUSTER_1);
String c1Path = testDataCluster1.getAbsolutePath(); String c1Path = testDataCluster1.getAbsolutePath();
conf.set(MiniDFSCluster.HDFS_MINIDFS_BASEDIR, c1Path); conf.set(MiniDFSCluster.HDFS_MINIDFS_BASEDIR, c1Path);
MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).build(); cluster = new MiniDFSCluster.Builder(conf).build();
try {
assertEquals(new File(c1Path + "/data"), assertEquals(new File(c1Path + "/data"),
new File(cluster.getDataDirectory())); new File(cluster.getDataDirectory()));
} finally { } finally {
if (oldPrp != null) {
System.setProperty(MiniDFSCluster.PROP_TEST_BUILD_DATA, oldPrp);
}
if (cluster != null) {
cluster.shutdown(); cluster.shutdown();
} }
} }
}
/** /**
* Bring up two clusters and assert that they are in different directories. * Bring up two clusters and assert that they are in different directories.

View File

@ -386,8 +386,8 @@ public class TestBlocksWithNotEnoughRacks {
// Configure an excludes file // Configure an excludes file
FileSystem localFileSys = FileSystem.getLocal(conf); FileSystem localFileSys = FileSystem.getLocal(conf);
Path workingDir = localFileSys.getWorkingDirectory(); Path workingDir = new Path(MiniDFSCluster.getBaseDirectory());
Path dir = new Path(workingDir, "build/test/data/temp/decommission"); Path dir = new Path(workingDir, "temp/decommission");
Path excludeFile = new Path(dir, "exclude"); Path excludeFile = new Path(dir, "exclude");
Path includeFile = new Path(dir, "include"); Path includeFile = new Path(dir, "include");
assertTrue(localFileSys.mkdirs(dir)); assertTrue(localFileSys.mkdirs(dir));
@ -439,8 +439,8 @@ public class TestBlocksWithNotEnoughRacks {
// Configure an excludes file // Configure an excludes file
FileSystem localFileSys = FileSystem.getLocal(conf); FileSystem localFileSys = FileSystem.getLocal(conf);
Path workingDir = localFileSys.getWorkingDirectory(); Path workingDir = new Path(MiniDFSCluster.getBaseDirectory());
Path dir = new Path(workingDir, "build/test/data/temp/decommission"); Path dir = new Path(workingDir, "temp/decommission");
Path excludeFile = new Path(dir, "exclude"); Path excludeFile = new Path(dir, "exclude");
Path includeFile = new Path(dir, "include"); Path includeFile = new Path(dir, "include");
assertTrue(localFileSys.mkdirs(dir)); assertTrue(localFileSys.mkdirs(dir));

View File

@ -83,8 +83,8 @@ public class TestHostsFiles {
// Configure an excludes file // Configure an excludes file
FileSystem localFileSys = FileSystem.getLocal(conf); FileSystem localFileSys = FileSystem.getLocal(conf);
Path workingDir = localFileSys.getWorkingDirectory(); Path workingDir = new Path(MiniDFSCluster.getBaseDirectory());
Path dir = new Path(workingDir, "build/test/data/temp/decommission"); Path dir = new Path(workingDir, "temp/decommission");
Path excludeFile = new Path(dir, "exclude"); Path excludeFile = new Path(dir, "exclude");
Path includeFile = new Path(dir, "include"); Path includeFile = new Path(dir, "include");
assertTrue(localFileSys.mkdirs(dir)); assertTrue(localFileSys.mkdirs(dir));
@ -143,8 +143,8 @@ public class TestHostsFiles {
// Configure an excludes file // Configure an excludes file
FileSystem localFileSys = FileSystem.getLocal(conf); FileSystem localFileSys = FileSystem.getLocal(conf);
Path workingDir = localFileSys.getWorkingDirectory(); Path workingDir = new Path(MiniDFSCluster.getBaseDirectory());
Path dir = new Path(workingDir, "build/test/data/temp/decommission"); Path dir = new Path(workingDir, "temp/decommission");
Path excludeFile = new Path(dir, "exclude"); Path excludeFile = new Path(dir, "exclude");
Path includeFile = new Path(dir, "include"); Path includeFile = new Path(dir, "include");
assertTrue(localFileSys.mkdirs(dir)); assertTrue(localFileSys.mkdirs(dir));