HDFS-14754. Erasure Coding : The number of Under-Replicated Blocks never reduced(addendum). Contributed by Surendra Singh Lilhore.

This commit is contained in:
Surendra Singh Lilhore 2019-10-09 23:20:28 +05:30
parent 2d81abce5e
commit d76e2655ac
1 changed files with 9 additions and 5 deletions

View File

@ -58,7 +58,7 @@ public class TestRedudantBlocks {
private final int cellSize = ecPolicy.getCellSize(); private final int cellSize = ecPolicy.getCellSize();
private final int stripesPerBlock = 4; private final int stripesPerBlock = 4;
private final int blockSize = stripesPerBlock * cellSize; private final int blockSize = stripesPerBlock * cellSize;
private final int numDNs = groupSize + 1; private final int numDNs = groupSize;
@Before @Before
public void setup() throws IOException { public void setup() throws IOException {
@ -110,12 +110,16 @@ public class TestRedudantBlocks {
// update blocksMap // update blocksMap
cluster.triggerBlockReports(); cluster.triggerBlockReports();
// add to invalidates // delete redundant block
cluster.triggerHeartbeats(); cluster.triggerHeartbeats();
// datanode delete block //wait for IBR
Thread.sleep(1100);
// trigger reconstruction
cluster.triggerHeartbeats(); cluster.triggerHeartbeats();
// update blocksMap
cluster.triggerBlockReports(); //wait for IBR
Thread.sleep(1100);
HashSet<Long> blockIdsSet = new HashSet<Long>(); HashSet<Long> blockIdsSet = new HashSet<Long>();