HADOOP-16662. Remove unnecessary InnerNode check in NetworkTopology#add(). Contributed by Lisheng Sun.

This commit is contained in:
Ayush Saxena 2019-10-19 11:05:54 +05:30
parent 155864da00
commit 2ae4b33d48

View File

@ -146,12 +146,10 @@ public void add(Node node) {
if (rack == null) {
incrementRacks();
}
if (!(node instanceof InnerNode)) {
if (depthOfAllLeaves == -1) {
depthOfAllLeaves = node.getLevel();
}
}
}
LOG.debug("NetworkTopology became:\n{}", this);
} finally {
netlock.writeLock().unlock();