HDFS-9535. Newly completed blocks in IBR should not be considered under-replicated too quickly. Contributed by Mingliang Liu.

(cherry picked from commit e534569814)
(cherry picked from commit e02ad5a618)
This commit is contained in:
Jing Zhao 2015-12-14 11:05:09 -08:00
parent c2e788a7b5
commit 73a055bb9f
2 changed files with 4 additions and 0 deletions

View File

@ -847,6 +847,9 @@ Release 2.8.0 - UNRELEASED
HDFS-9532. Detailed exception info is lost in reportTo methods of HDFS-9532. Detailed exception info is lost in reportTo methods of
ErrorReportAction and ReportBadBlockAction. (Yongjun Zhang) ErrorReportAction and ReportBadBlockAction. (Yongjun Zhang)
HDFS-9535. Newly completed blocks in IBR should not be considered
under-replicated too quickly. (Mingliang Liu via jing9)
OPTIMIZATIONS OPTIMIZATIONS
HDFS-8026. Trace FSOutputSummer#writeChecksumChunks rather than HDFS-8026. Trace FSOutputSummer#writeChecksumChunks rather than

View File

@ -2601,6 +2601,7 @@ public class BlockManager implements BlockStatsMXBean {
if(storedBlock.getBlockUCState() == BlockUCState.COMMITTED && if(storedBlock.getBlockUCState() == BlockUCState.COMMITTED &&
numLiveReplicas >= minReplication) { numLiveReplicas >= minReplication) {
addExpectedReplicasToPending(storedBlock);
completeBlock(storedBlock, false); completeBlock(storedBlock, false);
} else if (storedBlock.isComplete() && result == AddBlockResult.ADDED) { } else if (storedBlock.isComplete() && result == AddBlockResult.ADDED) {
// check whether safe replication is reached for the block // check whether safe replication is reached for the block