HDFS-10590: Fix TestReconstructStripedBlocks.testCountLiveReplicas test failures. Contributed by Rakesh R
This commit is contained in:
parent
087290e6b1
commit
438b7c5935
@ -514,6 +514,8 @@ static void verifyParityBlocks(Configuration conf, final long size,
|
|||||||
public static LocatedBlocks waitForReconstructionFinished(Path file,
|
public static LocatedBlocks waitForReconstructionFinished(Path file,
|
||||||
DistributedFileSystem fs, int groupSize)
|
DistributedFileSystem fs, int groupSize)
|
||||||
throws Exception {
|
throws Exception {
|
||||||
|
LOG.info("Waiting for reconstruction to be finished for the file:" + file
|
||||||
|
+ ", groupSize:" + groupSize);
|
||||||
final int attempts = 60;
|
final int attempts = 60;
|
||||||
for (int i = 0; i < attempts; i++) {
|
for (int i = 0; i < attempts; i++) {
|
||||||
LocatedBlocks locatedBlocks = getLocatedBlocks(file, fs);
|
LocatedBlocks locatedBlocks = getLocatedBlocks(file, fs);
|
||||||
|
@ -303,6 +303,8 @@ public void testCountLiveReplicas() throws Exception {
|
|||||||
|
|
||||||
// check if NN can detect the missing internal block and finish the
|
// check if NN can detect the missing internal block and finish the
|
||||||
// reconstruction
|
// reconstruction
|
||||||
|
StripedFileTestUtil.waitForReconstructionFinished(filePath, fs,
|
||||||
|
GROUP_SIZE);
|
||||||
boolean reconstructed = false;
|
boolean reconstructed = false;
|
||||||
for (int i = 0; i < 5; i++) {
|
for (int i = 0; i < 5; i++) {
|
||||||
NumberReplicas num = null;
|
NumberReplicas num = null;
|
||||||
|
Loading…
Reference in New Issue
Block a user