HDFS-6511. BlockManager#computeInvalidateWork() could do nothing. Contributed by Juan Yu.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1607735 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f881f0e923
commit
151c5deaf1
|
@ -264,6 +264,8 @@ Release 2.6.0 - UNRELEASED
|
|||
|
||||
HDFS-6613. Improve logging in caching classes. (wang)
|
||||
|
||||
HDFS-6511. BlockManager#computeInvalidateWork() could do nothing. (Juan Yu via wang)
|
||||
|
||||
OPTIMIZATIONS
|
||||
|
||||
BUG FIXES
|
||||
|
|
|
@ -1226,8 +1226,14 @@ public class BlockManager {
|
|||
nodesToProcess = Math.min(nodes.size(), nodesToProcess);
|
||||
|
||||
int blockCnt = 0;
|
||||
for(int nodeCnt = 0; nodeCnt < nodesToProcess; nodeCnt++ ) {
|
||||
blockCnt += invalidateWorkForOneNode(nodes.get(nodeCnt));
|
||||
for (DatanodeInfo dnInfo : nodes) {
|
||||
int blocks = invalidateWorkForOneNode(dnInfo);
|
||||
if (blocks > 0) {
|
||||
blockCnt += blocks;
|
||||
if (--nodesToProcess == 0) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return blockCnt;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue