From 39cad5f28fec1d0de7e5a80dc3399f0ad1fd3fce Mon Sep 17 00:00:00 2001 From: secfree Date: Fri, 28 Jan 2022 16:04:11 +0800 Subject: [PATCH] HDFS-16169. Fix TestBlockTokenWithDFSStriped#testEnd2End failure (#3850) Reviewed-by: Fei Hui Reviewed-by: litao Signed-off-by: Akira Ajisaka --- .../org/apache/hadoop/hdfs/server/balancer/TestBalancer.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/balancer/TestBalancer.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/balancer/TestBalancer.java index ff7820abd2e..49d7a7ea97b 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/balancer/TestBalancer.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/balancer/TestBalancer.java @@ -1687,6 +1687,11 @@ public class TestBalancer { BalancerParameters p = BalancerParameters.DEFAULT; runBalancer(conf, totalUsedSpace, totalCapacity, p, 0); + // namenode will ask datanode to delete replicas in heartbeat response + cluster.triggerHeartbeats(); + // namenode will update block locations according to the report + cluster.triggerDeletionReports(); + // verify locations of striped blocks locatedBlocks = client.getBlockLocations(fileName, 0, fileLen); StripedFileTestUtil.verifyLocatedStripedBlocks(locatedBlocks, groupSize);