HDFS-16169. Fix TestBlockTokenWithDFSStriped#testEnd2End failure (#3850)

Reviewed-by: Fei Hui <feihui.ustc@gmail.com>
Reviewed-by: litao <tomleescut@gmail.com>
Signed-off-by: Akira Ajisaka <aajisaka@apache.org>
(cherry picked from commit 39cad5f28f)
This commit is contained in:
secfree 2022-01-28 16:04:11 +08:00 committed by Akira Ajisaka
parent 8032b680fb
commit 110104da38

View File

@ -1638,6 +1638,11 @@ private void doTestBalancerWithStripedFile(Configuration conf) throws Exception
BalancerParameters p = BalancerParameters.DEFAULT; BalancerParameters p = BalancerParameters.DEFAULT;
runBalancer(conf, totalUsedSpace, totalCapacity, p, 0); 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 // verify locations of striped blocks
locatedBlocks = client.getBlockLocations(fileName, 0, fileLen); locatedBlocks = client.getBlockLocations(fileName, 0, fileLen);
StripedFileTestUtil.verifyLocatedStripedBlocks(locatedBlocks, groupSize); StripedFileTestUtil.verifyLocatedStripedBlocks(locatedBlocks, groupSize);