|
@@ -688,11 +688,7 @@ public class TestFileTruncate {
|
|
/*
|
|
/*
|
|
* For non copy-on-truncate, the truncated block id is the same, but the
|
|
* For non copy-on-truncate, the truncated block id is the same, but the
|
|
* GS should increase.
|
|
* GS should increase.
|
|
- * We trigger block report for dn0 after it restarts, since the GS
|
|
|
|
- * of replica for the last block on it is old, so the reported last block
|
|
|
|
- * from dn0 should be marked corrupt on nn and the replicas of last block
|
|
|
|
- * on nn should decrease 1, then the truncated block will be replicated
|
|
|
|
- * to dn0.
|
|
|
|
|
|
+ * The truncated block will be replicated to dn0 after it restarts.
|
|
*/
|
|
*/
|
|
assertEquals(newBlock.getBlock().getBlockId(),
|
|
assertEquals(newBlock.getBlock().getBlockId(),
|
|
oldBlock.getBlock().getBlockId());
|
|
oldBlock.getBlock().getBlockId());
|
|
@@ -748,8 +744,7 @@ public class TestFileTruncate {
|
|
LocatedBlock newBlock = getLocatedBlocks(p).getLastLocatedBlock();
|
|
LocatedBlock newBlock = getLocatedBlocks(p).getLastLocatedBlock();
|
|
/*
|
|
/*
|
|
* For copy-on-truncate, new block is made with new block id and new GS.
|
|
* For copy-on-truncate, new block is made with new block id and new GS.
|
|
- * We trigger block report for dn1 after it restarts. The replicas of
|
|
|
|
- * the new block is 2, and then it will be replicated to dn1.
|
|
|
|
|
|
+ * The replicas of the new block is 2, then it will be replicated to dn1.
|
|
*/
|
|
*/
|
|
assertNotEquals(newBlock.getBlock().getBlockId(),
|
|
assertNotEquals(newBlock.getBlock().getBlockId(),
|
|
oldBlock.getBlock().getBlockId());
|
|
oldBlock.getBlock().getBlockId());
|
|
@@ -802,7 +797,6 @@ public class TestFileTruncate {
|
|
cluster.restartDataNode(dn1, true, true);
|
|
cluster.restartDataNode(dn1, true, true);
|
|
cluster.waitActive();
|
|
cluster.waitActive();
|
|
checkBlockRecovery(p);
|
|
checkBlockRecovery(p);
|
|
- cluster.triggerBlockReports();
|
|
|
|
|
|
|
|
LocatedBlock newBlock = getLocatedBlocks(p).getLastLocatedBlock();
|
|
LocatedBlock newBlock = getLocatedBlocks(p).getLastLocatedBlock();
|
|
/*
|
|
/*
|