From 5b55e1f2f7be93e2647b784f0febff10d8b74164 Mon Sep 17 00:00:00 2001 From: "secfree.teng" Date: Mon, 3 Jan 2022 19:58:36 +0800 Subject: [PATCH] HDFS-16169. Fix TestBlockTokenWithDFSStriped#testEnd2End failure --- .../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 ff7820abd2e26..49d7a7ea97b33 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 @@ private void doTestBalancerWithStripedFile(Configuration conf) throws Exception 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);