hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From asur...@apache.org
Subject [03/27] hadoop git commit: HDFS-9458. TestBackupNode always binds to port 50070, which can cause bind failures. Contributed by Xiao Chen.
Date Wed, 30 Dec 2015 06:56:28 GMT
HDFS-9458. TestBackupNode always binds to port 50070, which can cause bind failures. Contributed
by Xiao Chen.


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/5c0ff696
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/5c0ff696
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/5c0ff696

Branch: refs/heads/yarn-2877
Commit: 5c0ff69618fa303078c0f9afef4c93a864ab6cb7
Parents: bb540ba
Author: cnauroth <cnauroth@apache.org>
Authored: Tue Dec 22 10:29:35 2015 -0800
Committer: cnauroth <cnauroth@apache.org>
Committed: Tue Dec 22 10:29:35 2015 -0800

----------------------------------------------------------------------
 hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt                 | 3 +++
 .../apache/hadoop/hdfs/server/namenode/TestBackupNode.java  | 9 ++++++---
 2 files changed, 9 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/5c0ff696/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 2b980ec..699d5cc 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
+++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
@@ -2544,6 +2544,9 @@ Release 2.8.0 - UNRELEASED
     HDFS-9589. Block files which have been hardlinked should be duplicated
     before the DataNode appends to the them (cmccabe)
 
+    HDFS-9458. TestBackupNode always binds to port 50070, which can cause bind
+    failures. (Xiao Chen via cnauroth)
+
 Release 2.7.3 - UNRELEASED
 
   INCOMPATIBLE CHANGES

http://git-wip-us.apache.org/repos/asf/hadoop/blob/5c0ff696/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestBackupNode.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestBackupNode.java
b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestBackupNode.java
index 5b965ae..10d9f11 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestBackupNode.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestBackupNode.java
@@ -48,6 +48,7 @@ import org.apache.hadoop.hdfs.server.common.Storage.StorageDirectory;
 import org.apache.hadoop.hdfs.server.namenode.FileJournalManager.EditLogFile;
 import org.apache.hadoop.hdfs.server.protocol.NamenodeProtocols;
 import org.apache.hadoop.net.NetUtils;
+import org.apache.hadoop.net.ServerSocketUtil;
 import org.apache.hadoop.security.SecurityUtil;
 import org.apache.hadoop.security.UserGroupInformation;
 import org.apache.hadoop.test.GenericTestUtils;
@@ -147,8 +148,9 @@ public class TestBackupNode {
     Configuration c = new HdfsConfiguration();
     StartupOption startupOpt = StartupOption.CHECKPOINT;
     String dirs = getBackupNodeDir(startupOpt, 1);
-    c.set(DFSConfigKeys.FS_DEFAULT_NAME_KEY, "hdfs://127.0.0.1:1234");
-    c.set(DFSConfigKeys.DFS_NAMENODE_BACKUP_HTTP_ADDRESS_KEY, "localhost:0");
+    c.set(DFSConfigKeys.FS_DEFAULT_NAME_KEY,
+        "hdfs://127.0.0.1:" + ServerSocketUtil.getPort(0, 100));
+    c.set(DFSConfigKeys.DFS_NAMENODE_HTTP_ADDRESS_KEY, "127.0.0.1:0");
     c.set(DFSConfigKeys.DFS_BLOCKREPORT_INITIAL_DELAY_KEY, "0");
     c.setInt(DFSConfigKeys.DFS_DATANODE_SCAN_PERIOD_HOURS_KEY,
         -1); // disable block scanner
@@ -183,7 +185,8 @@ public class TestBackupNode {
           bn.getNamesystem() == null);
       fail("Incorrect authentication setting should throw IOException");
     } catch (IOException e) {
-      LOG.info("IOException thrown as expected", e);
+      LOG.info("IOException thrown.", e);
+      assertTrue(e.getMessage().contains("Running in secure mode"));
     } finally {
       if (nn != null) {
         nn.stop();


Mime
View raw message