HDFS-11671. TestReconstructStripedBlocks#test2RecoveryTasksForSameBlockGroup fails.
This commit is contained in:
parent
46940d92e2
commit
c1549352cf
@ -1872,7 +1872,11 @@ public static RefreshUserMappingsProtocol getRefreshUserMappingsProtocolProxy(
|
|||||||
*/
|
*/
|
||||||
public static void setDatanodeDead(DatanodeInfo dn) {
|
public static void setDatanodeDead(DatanodeInfo dn) {
|
||||||
dn.setLastUpdate(0);
|
dn.setLastUpdate(0);
|
||||||
dn.setLastUpdateMonotonic(0);
|
// Set this to a large negative value.
|
||||||
|
// On short-lived VMs, the monotonic time can be less than the heartbeat
|
||||||
|
// expiry time. Setting this to 0 will fail to immediately mark the DN as
|
||||||
|
// dead.
|
||||||
|
dn.setLastUpdateMonotonic(Long.MIN_VALUE/2);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -211,12 +211,14 @@ public void test2RecoveryTasksForSameBlockGroup() throws Exception {
|
|||||||
Path p = new Path("/test2RecoveryTasksForSameBlockGroup");
|
Path p = new Path("/test2RecoveryTasksForSameBlockGroup");
|
||||||
final byte[] data = new byte[fileLen];
|
final byte[] data = new byte[fileLen];
|
||||||
DFSTestUtil.writeFile(fs, p, data);
|
DFSTestUtil.writeFile(fs, p, data);
|
||||||
|
DFSTestUtil.waitForReplication(fs, p, groupSize, 5000);
|
||||||
|
|
||||||
LocatedStripedBlock lb = (LocatedStripedBlock)fs.getClient()
|
LocatedStripedBlock lb = (LocatedStripedBlock)fs.getClient()
|
||||||
.getLocatedBlocks(p.toString(), 0).get(0);
|
.getLocatedBlocks(p.toString(), 0).get(0);
|
||||||
LocatedBlock[] lbs = StripedBlockUtil.parseStripedBlockGroup(lb,
|
LocatedBlock[] lbs = StripedBlockUtil.parseStripedBlockGroup(lb,
|
||||||
cellSize, dataBlocks, parityBlocks);
|
cellSize, dataBlocks, parityBlocks);
|
||||||
|
|
||||||
|
BlockManagerTestUtil.getComputedDatanodeWork(bm);
|
||||||
assertEquals(0, getNumberOfBlocksToBeErasureCoded(cluster));
|
assertEquals(0, getNumberOfBlocksToBeErasureCoded(cluster));
|
||||||
assertEquals(0, bm.getPendingReconstructionBlocksCount());
|
assertEquals(0, bm.getPendingReconstructionBlocksCount());
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user