diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/StripedFileTestUtil.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/StripedFileTestUtil.java index 4c3afdd7a5..0b036fdbfe 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/StripedFileTestUtil.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/StripedFileTestUtil.java @@ -514,6 +514,8 @@ static void verifyParityBlocks(Configuration conf, final long size, public static LocatedBlocks waitForReconstructionFinished(Path file, DistributedFileSystem fs, int groupSize) throws Exception { + LOG.info("Waiting for reconstruction to be finished for the file:" + file + + ", groupSize:" + groupSize); final int attempts = 60; for (int i = 0; i < attempts; i++) { LocatedBlocks locatedBlocks = getLocatedBlocks(file, fs); diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestReconstructStripedBlocks.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestReconstructStripedBlocks.java index 606992422e..c38b6b4d6a 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestReconstructStripedBlocks.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestReconstructStripedBlocks.java @@ -303,6 +303,8 @@ public void testCountLiveReplicas() throws Exception { // check if NN can detect the missing internal block and finish the // reconstruction + StripedFileTestUtil.waitForReconstructionFinished(filePath, fs, + GROUP_SIZE); boolean reconstructed = false; for (int i = 0; i < 5; i++) { NumberReplicas num = null;