svn merge -c 1532915 Merging from trunk to branch-2 to fix HDFS-5346.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1532916 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
bc18c6f842
commit
0c4da3693a
|
@ -3489,6 +3489,9 @@ Release 0.23.10 - UNRELEASED
|
||||||
HDFS-5010. Reduce the frequency of getCurrentUser() calls from namenode
|
HDFS-5010. Reduce the frequency of getCurrentUser() calls from namenode
|
||||||
(kihwal)
|
(kihwal)
|
||||||
|
|
||||||
|
HDFS-5346. Avoid unnecessary call to getNumLiveDataNodes() for each block
|
||||||
|
during IBR processing (Ravi Prakash via kihwal)
|
||||||
|
|
||||||
OPTIMIZATIONS
|
OPTIMIZATIONS
|
||||||
|
|
||||||
BUG FIXES
|
BUG FIXES
|
||||||
|
|
|
@ -4601,7 +4601,7 @@ public class FSNamesystem implements Namesystem, FSClusterStats,
|
||||||
*/
|
*/
|
||||||
private boolean needEnter() {
|
private boolean needEnter() {
|
||||||
return (threshold != 0 && blockSafe < blockThreshold) ||
|
return (threshold != 0 && blockSafe < blockThreshold) ||
|
||||||
(getNumLiveDataNodes() < datanodeThreshold) ||
|
(datanodeThreshold != 0 && getNumLiveDataNodes() < datanodeThreshold) ||
|
||||||
(!nameNodeHasResourcesAvailable());
|
(!nameNodeHasResourcesAvailable());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue