diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 379ab140a93..4b7f38298ab 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -119,6 +119,9 @@ Release 2.5.0 - UNRELEASED HDFS-6178. Decommission on standby NN couldn't finish. (Ming Ma via jing9) + HDFS-6213. TestDataNodeConfig failing on Jenkins runs due to DN web port + in use. (wang) + Release 2.4.1 - UNRELEASED INCOMPATIBLE CHANGES diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDatanodeConfig.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDatanodeConfig.java index 3507d6f3544..cfa14cca41b 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDatanodeConfig.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDatanodeConfig.java @@ -51,6 +51,8 @@ public class TestDatanodeConfig { public static void setUp() throws Exception { clearBaseDir(); Configuration conf = new HdfsConfiguration(); + conf.setInt(DFSConfigKeys.DFS_DATANODE_HTTPS_PORT_KEY, 0); + conf.set(DFSConfigKeys.DFS_DATANODE_ADDRESS_KEY, "localhost:0"); cluster = new MiniDFSCluster.Builder(conf).numDataNodes(0).build(); cluster.waitActive(); } @@ -100,8 +102,14 @@ public class TestDatanodeConfig { String dnDir3 = dataDir.getAbsolutePath() + "3"; conf.set(DFSConfigKeys.DFS_DATANODE_DATA_DIR_KEY, dnDir1 + "," + dnDir2 + "," + dnDir3); - cluster.startDataNodes(conf, 1, false, StartupOption.REGULAR, null); - assertTrue("Data-node should startup.", cluster.isDataNodeUp()); + try { + cluster.startDataNodes(conf, 1, false, StartupOption.REGULAR, null); + assertTrue("Data-node should startup.", cluster.isDataNodeUp()); + } finally { + if (cluster != null) { + cluster.shutdownDataNodes(); + } + } } private static String makeURI(String scheme, String host, String path)