diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index e1434c86c32..ebcc6aa1b38 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -1687,6 +1687,9 @@ Release 2.8.0 - UNRELEASED HDFS-9619. SimulatedFSDataset sometimes can not find blockpool for the correct namenode (Wei-Chiu Chuang via vinayakumarb) + HDFS-9626. TestBlockReplacement#testBlockReplacement fails occasionally. + (Xiao Chen via zhz) + Release 2.7.3 - UNRELEASED INCOMPATIBLE CHANGES diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestBlockReplacement.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestBlockReplacement.java index d2bf7341014..bfd02e2fd04 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestBlockReplacement.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestBlockReplacement.java @@ -198,9 +198,10 @@ public class TestBlockReplacement { LOG.info("Testcase 4: invalid del hint " + proxies.get(0) ); assertTrue(replaceBlock(b, proxies.get(0), proxies.get(1), source)); // after cluster has time to resolve the over-replication, - // block locations should contain two proxies, - // and either source or newNode, but not both. - checkBlocks(proxies.toArray(new DatanodeInfo[proxies.size()]), + // block locations should contain any 3 of the blocks, since after the + // deletion the number of racks is still >=2 for sure. + // See HDFS-9314 for details, espacially the comment on 18/Nov/15 14:09. + checkBlocks(new DatanodeInfo[]{}, fileName.toString(), DEFAULT_BLOCK_SIZE, REPLICATION_FACTOR, client); } finally {