hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From x...@apache.org
Subject hadoop git commit: HDFS-14021. TestReconstructStripedBlocksWithRackAwareness#testReconstructForNotEnoughRacks fails intermittently. Contributed by Xiao Chen.
Date Wed, 24 Oct 2018 16:38:50 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-3.0 e402791a5 -> 6aef51479


HDFS-14021. TestReconstructStripedBlocksWithRackAwareness#testReconstructForNotEnoughRacks
fails intermittently. Contributed by Xiao Chen.

(cherry picked from commit c1874046e2f9275ba330090fcf12c5611c6d6fc4)


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

Branch: refs/heads/branch-3.0
Commit: 6aef514795f9da64a0255ebaa5154f7ca20d265f
Parents: e402791
Author: Inigo Goiri <inigoiri@apache.org>
Authored: Wed Oct 24 09:20:38 2018 -0700
Committer: Xiao Chen <xiao@apache.org>
Committed: Wed Oct 24 09:38:48 2018 -0700

----------------------------------------------------------------------
 .../TestReconstructStripedBlocksWithRackAwareness.java   | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/6aef5147/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestReconstructStripedBlocksWithRackAwareness.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestReconstructStripedBlocksWithRackAwareness.java
b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestReconstructStripedBlocksWithRackAwareness.java
index 7d16017c..555673c 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestReconstructStripedBlocksWithRackAwareness.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestReconstructStripedBlocksWithRackAwareness.java
@@ -162,7 +162,9 @@ public class TestReconstructStripedBlocksWithRackAwareness {
     // the file's block is in 9 dn but 5 racks
     DFSTestUtil.createFile(fs, file,
         cellSize * dataBlocks * 2, (short) 1, 0L);
-    Assert.assertEquals(0, bm.numOfUnderReplicatedBlocks());
+    GenericTestUtils.waitFor(() ->
+        bm.numOfUnderReplicatedBlocks() == 0, 100, 30000);
+    LOG.info("Created file {}", file);
 
     final INodeFile fileNode = fsn.getFSDirectory()
         .getINode4Write(file.toString()).asFile();
@@ -173,7 +175,8 @@ public class TestReconstructStripedBlocksWithRackAwareness {
     for (DatanodeStorageInfo storage : blockInfo.storages) {
       rackSet.add(storage.getDatanodeDescriptor().getNetworkLocation());
     }
-    Assert.assertEquals(dataBlocks - 1, rackSet.size());
+    Assert.assertEquals("rackSet size is wrong: " + rackSet, dataBlocks - 1,
+        rackSet.size());
 
     // restart the stopped datanode
     cluster.restartDataNode(lastHost);
@@ -181,6 +184,7 @@ public class TestReconstructStripedBlocksWithRackAwareness {
 
     // make sure we have 6 racks again
     NetworkTopology topology = bm.getDatanodeManager().getNetworkTopology();
+    LOG.info("topology is: {}", topology);
     Assert.assertEquals(hosts.length, topology.getNumOfLeaves());
     Assert.assertEquals(dataBlocks, topology.getNumOfRacks());
 
@@ -202,7 +206,8 @@ public class TestReconstructStripedBlocksWithRackAwareness {
       for (DatanodeStorageInfo storage : blockInfo.storages) {
         if (storage != null) {
           DatanodeDescriptor dn = storage.getDatanodeDescriptor();
-          Assert.assertEquals(0, dn.getNumberOfBlocksToBeErasureCoded());
+          Assert.assertEquals("Block to be erasure coded is wrong for datanode:"
+              + dn, 0, dn.getNumberOfBlocksToBeErasureCoded());
           if (dn.getNumberOfBlocksToBeReplicated() == 1) {
             scheduled = true;
           }


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