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-6613. Improve logging in caching classes. (wang)
|
||||||
|
|
||||||
|
HDFS-6511. BlockManager#computeInvalidateWork() could do nothing. (Juan Yu via wang)
|
||||||
|
|
||||||
OPTIMIZATIONS
|
OPTIMIZATIONS
|
||||||
|
|
||||||
BUG FIXES
|
BUG FIXES
|
||||||
|
@ -1226,8 +1226,14 @@ int computeInvalidateWork(int nodesToProcess) {
|
|||||||
nodesToProcess = Math.min(nodes.size(), nodesToProcess);
|
nodesToProcess = Math.min(nodes.size(), nodesToProcess);
|
||||||
|
|
||||||
int blockCnt = 0;
|
int blockCnt = 0;
|
||||||
for(int nodeCnt = 0; nodeCnt < nodesToProcess; nodeCnt++ ) {
|
for (DatanodeInfo dnInfo : nodes) {
|
||||||
blockCnt += invalidateWorkForOneNode(nodes.get(nodeCnt));
|
int blocks = invalidateWorkForOneNode(dnInfo);
|
||||||
|
if (blocks > 0) {
|
||||||
|
blockCnt += blocks;
|
||||||
|
if (--nodesToProcess == 0) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return blockCnt;
|
return blockCnt;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user