Skip to content

Commit d76e265

Browse files
HDFS-14754. Erasure Coding : The number of Under-Replicated Blocks never reduced(addendum). Contributed by Surendra Singh Lilhore.
1 parent 2d81abc commit d76e265

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestRedudantBlocks.java

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public class TestRedudantBlocks {
5858
private final int cellSize = ecPolicy.getCellSize();
5959
private final int stripesPerBlock = 4;
6060
private final int blockSize = stripesPerBlock * cellSize;
61-
private final int numDNs = groupSize + 1;
61+
private final int numDNs = groupSize;
6262

6363
@Before
6464
public void setup() throws IOException {
@@ -110,12 +110,16 @@ public void testProcessOverReplicatedAndRedudantBlock() throws Exception {
110110

111111
// update blocksMap
112112
cluster.triggerBlockReports();
113-
// add to invalidates
113+
// delete redundant block
114114
cluster.triggerHeartbeats();
115-
// datanode delete block
115+
//wait for IBR
116+
Thread.sleep(1100);
117+
118+
// trigger reconstruction
116119
cluster.triggerHeartbeats();
117-
// update blocksMap
118-
cluster.triggerBlockReports();
120+
121+
//wait for IBR
122+
Thread.sleep(1100);
119123

120124
HashSet<Long> blockIdsSet = new HashSet<Long>();
121125

0 commit comments

Comments
 (0)