hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sunc...@apache.org
Subject [14/50] [abbrv] hadoop git commit: HDFS-13959. TestUpgradeDomainBlockPlacementPolicy is flaky. Contributed by Ayush Saxena.
Date Wed, 31 Oct 2018 18:23:25 GMT
HDFS-13959. TestUpgradeDomainBlockPlacementPolicy is flaky. Contributed by Ayush Saxena.


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

Branch: refs/heads/HDFS-12943
Commit: 1851d06eb3b70f39f3054a7c06f0ad2bc664aaec
Parents: dce4ebe
Author: Inigo Goiri <inigoiri@apache.org>
Authored: Fri Oct 26 09:29:12 2018 -0700
Committer: Inigo Goiri <inigoiri@apache.org>
Committed: Fri Oct 26 09:29:12 2018 -0700

----------------------------------------------------------------------
 .../TestUpgradeDomainBlockPlacementPolicy.java  | 22 ++++++++++++--------
 1 file changed, 13 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/1851d06e/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestUpgradeDomainBlockPlacementPolicy.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestUpgradeDomainBlockPlacementPolicy.java
b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestUpgradeDomainBlockPlacementPolicy.java
index 8460b6f..3383c4e 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestUpgradeDomainBlockPlacementPolicy.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestUpgradeDomainBlockPlacementPolicy.java
@@ -65,14 +65,8 @@ public class TestUpgradeDomainBlockPlacementPolicy {
   private static final int DEFAULT_BLOCK_SIZE = 1024;
   static final String[] racks =
       { "/RACK1", "/RACK1", "/RACK1", "/RACK2", "/RACK2", "/RACK2" };
-  /**
-   *  Use host names that can be resolved (
-   *  InetSocketAddress#isUnresolved == false). Otherwise,
-   *  CombinedHostFileManager won't allow those hosts.
-   */
   static final String[] hosts =
-      {"127.0.0.1", "127.0.0.1", "127.0.0.1", "127.0.0.1",
-          "127.0.0.1", "127.0.0.1"};
+      {"host1", "host2", "host3", "host4", "host5", "host6"};
   static final String[] upgradeDomains =
       {"ud5", "ud2", "ud3", "ud1", "ud2", "ud4"};
   static final Set<DatanodeID> expectedDatanodeIDs = new HashSet<>();
@@ -134,7 +128,12 @@ public class TestUpgradeDomainBlockPlacementPolicy {
     for (int i = 0; i < hosts.length; i++) {
       datanodes[i] = new DatanodeAdminProperties();
       DatanodeID datanodeID = cluster.getDataNodes().get(i).getDatanodeId();
-      datanodes[i].setHostName(datanodeID.getHostName());
+      /*
+       *  Use host names that can be resolved (
+       *  InetSocketAddress#isUnresolved == false). Otherwise,
+       *  CombinedHostFileManager won't allow those hosts.
+       */
+      datanodes[i].setHostName(datanodeID.getIpAddr());
       datanodes[i].setPort(datanodeID.getXferPort());
       datanodes[i].setUpgradeDomain(upgradeDomains[i]);
     }
@@ -168,7 +167,12 @@ public class TestUpgradeDomainBlockPlacementPolicy {
     for (int i = 0; i < hosts.length; i++) {
       datanodes[i] = new DatanodeAdminProperties();
       DatanodeID datanodeID = cluster.getDataNodes().get(i).getDatanodeId();
-      datanodes[i].setHostName(datanodeID.getHostName());
+      /*
+       *  Use host names that can be resolved (
+       *  InetSocketAddress#isUnresolved == false). Otherwise,
+       *  CombinedHostFileManager won't allow those hosts.
+       */
+      datanodes[i].setHostName(datanodeID.getIpAddr());
       datanodes[i].setPort(datanodeID.getXferPort());
       datanodes[i].setUpgradeDomain(upgradeDomains[i]);
     }


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message