HDFS-2486. Remove unnecessary priority level checks in UnderReplicatedBlocks. Contributed by Uma Maheswara Rao G
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1242636 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
2a2faac0de
commit
dc847b39fd
|
@ -126,6 +126,9 @@ Trunk (unreleased changes)
|
|||
HDFS-2786. Fix host-based token incompatibilities in DFSUtil. (Kihwal Lee
|
||||
via jitendra)
|
||||
|
||||
HDFS-2486. Remove unnecessary priority level checks in
|
||||
UnderReplicatedBlocks. (Uma Maheswara Rao G via szetszwo)
|
||||
|
||||
OPTIMIZATIONS
|
||||
HDFS-2477. Optimize computing the diff between a block report and the
|
||||
namenode state. (Tomasz Nykiel via hairong)
|
||||
|
|
|
@ -189,7 +189,7 @@ class UnderReplicatedBlocks implements Iterable<Block> {
|
|||
assert curReplicas >= 0 : "Negative replicas!";
|
||||
int priLevel = getPriority(block, curReplicas, decomissionedReplicas,
|
||||
expectedReplicas);
|
||||
if(priLevel != LEVEL && priorityQueues.get(priLevel).add(block)) {
|
||||
if(priorityQueues.get(priLevel).add(block)) {
|
||||
if(NameNode.stateChangeLog.isDebugEnabled()) {
|
||||
NameNode.stateChangeLog.debug(
|
||||
"BLOCK* NameSystem.UnderReplicationBlock.add:"
|
||||
|
@ -292,10 +292,10 @@ class UnderReplicatedBlocks implements Iterable<Block> {
|
|||
" curPri " + curPri +
|
||||
" oldPri " + oldPri);
|
||||
}
|
||||
if(oldPri != LEVEL && oldPri != curPri) {
|
||||
if(oldPri != curPri) {
|
||||
remove(block, oldPri);
|
||||
}
|
||||
if(curPri != LEVEL && priorityQueues.get(curPri).add(block)) {
|
||||
if(priorityQueues.get(curPri).add(block)) {
|
||||
if(NameNode.stateChangeLog.isDebugEnabled()) {
|
||||
NameNode.stateChangeLog.debug(
|
||||
"BLOCK* NameSystem.UnderReplicationBlock.update:"
|
||||
|
|
Loading…
Reference in New Issue