HDFS-5346. Avoid unnecessary call to getNumLiveDataNodes() for each block during IBR processing. Contributed by Ravi Prakash.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1532915 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
dea1b2e84a
commit
a0fc90ea92
@ -3674,6 +3674,9 @@ Release 0.23.10 - UNRELEASED
|
||||
HDFS-5010. Reduce the frequency of getCurrentUser() calls from namenode
|
||||
(kihwal)
|
||||
|
||||
HDFS-5346. Avoid unnecessary call to getNumLiveDataNodes() for each block
|
||||
during IBR processing (Ravi Prakash via kihwal)
|
||||
|
||||
OPTIMIZATIONS
|
||||
|
||||
BUG FIXES
|
||||
|
@ -4618,7 +4618,7 @@ private synchronized boolean canLeave() {
|
||||
*/
|
||||
private boolean needEnter() {
|
||||
return (threshold != 0 && blockSafe < blockThreshold) ||
|
||||
(getNumLiveDataNodes() < datanodeThreshold) ||
|
||||
(datanodeThreshold != 0 && getNumLiveDataNodes() < datanodeThreshold) ||
|
||||
(!nameNodeHasResourcesAvailable());
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user