HDFS-9225. Fix intermittent test failure of TestBlockManager.testBlocksAreNotUnderreplicatedInSingleRack. Contributed by Masatake Iwasaki.
This commit is contained in:
parent
2f19602bba
commit
3e50f478b9
@ -1549,6 +1549,10 @@ Release 2.8.0 - UNRELEASED
|
||||
HDFS-8647. Abstract BlockManager's rack policy into BlockPlacementPolicy.
|
||||
(Brahma Reddy Battula via mingma)
|
||||
|
||||
HDFS-9225. Fix intermittent test failure of
|
||||
TestBlockManager.testBlocksAreNotUnderreplicatedInSingleRack.
|
||||
(Masatake Iwasaki via wang)
|
||||
|
||||
OPTIMIZATIONS
|
||||
|
||||
HDFS-8026. Trace FSOutputSummer#writeChecksumChunks rather than
|
||||
|
@ -100,6 +100,7 @@ public void setupMockCluster() throws IOException {
|
||||
fsn = Mockito.mock(FSNamesystem.class);
|
||||
Mockito.doReturn(true).when(fsn).hasWriteLock();
|
||||
Mockito.doReturn(true).when(fsn).hasReadLock();
|
||||
Mockito.doReturn(true).when(fsn).isRunning();
|
||||
bm = new BlockManager(fsn, conf);
|
||||
final String[] racks = {
|
||||
"/rackA",
|
||||
@ -373,9 +374,8 @@ private void doTestSingleRackClusterIsSufficientlyReplicated(int testIndex,
|
||||
List<DatanodeDescriptor> origNodes)
|
||||
throws Exception {
|
||||
assertEquals(0, bm.numOfUnderReplicatedBlocks());
|
||||
addBlockOnNodes(testIndex, origNodes);
|
||||
bm.processMisReplicatedBlocks();
|
||||
assertEquals(0, bm.numOfUnderReplicatedBlocks());
|
||||
BlockInfo block = addBlockOnNodes(testIndex, origNodes);
|
||||
assertFalse(bm.isNeededReplication(block, bm.countLiveNodes(block)));
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user