hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shahr...@apache.org
Subject hadoop git commit: HDFS-10803. TestBalancerWithMultipleNameNodes#testBalancing2OutOf3Blockpools fails intermittently due to no free space available. Contributed by Yiqun Lin.
Date Thu, 17 May 2018 15:35:24 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2.8 d86e38cec -> 9f3db02cd


HDFS-10803. TestBalancerWithMultipleNameNodes#testBalancing2OutOf3Blockpools fails intermittently
due to no free space available. Contributed by Yiqun Lin.

(cherry picked from commit 4afd50b10650a72162c40cf86dea44676013f262)


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

Branch: refs/heads/branch-2.8
Commit: 9f3db02cdbd399574c008523802a817fb04d02ea
Parents: d86e38c
Author: Yiqun Lin <yqlin@apache.org>
Authored: Tue Mar 13 10:15:51 2018 +0800
Committer: Rushabh Shah <shahrs87@apache.org>
Committed: Thu May 17 10:28:38 2018 -0500

----------------------------------------------------------------------
 .../balancer/TestBalancerWithMultipleNameNodes.java       | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/9f3db02c/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/balancer/TestBalancerWithMultipleNameNodes.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/balancer/TestBalancerWithMultipleNameNodes.java
b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/balancer/TestBalancerWithMultipleNameNodes.java
index f01d79e..062b22e 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/balancer/TestBalancerWithMultipleNameNodes.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/balancer/TestBalancerWithMultipleNameNodes.java
@@ -373,13 +373,19 @@ public class TestBalancerWithMultipleNameNodes {
     }
 
     conf.set(DFSConfigKeys.DFS_NAMENODE_SAFEMODE_THRESHOLD_PCT_KEY, "0.0f");
+    // Adjust the capacity of each DN since it will redistribute blocks
+    // nNameNodes times in the following operations.
+    long[] newCapacities = new long[nDataNodes];
+    for (int i = 0; i < nDataNodes; i++) {
+      newCapacities[i] = capacities[i] * nNameNodes;
+    }
     {
       LOG.info("UNEVEN 10");
       final MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf)
           .nnTopology(MiniDFSNNTopology.simpleFederatedTopology(nNameNodes))
           .numDataNodes(nDataNodes)
           .racks(racks)
-          .simulatedCapacities(capacities)
+          .simulatedCapacities(newCapacities)
           .format(false)
           .build();
       LOG.info("UNEVEN 11");
@@ -407,7 +413,7 @@ public class TestBalancerWithMultipleNameNodes {
           LOG.info("UNEVEN 13: n=" + n);
         }
     
-        final long totalCapacity = TestBalancer.sum(capacities);
+        final long totalCapacity = TestBalancer.sum(newCapacities);
         final long totalUsed = nNameNodes*usedSpacePerNN;
         LOG.info("UNEVEN 14");
         runBalancer(s, totalUsed, totalCapacity);


---------------------------------------------------------------------
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