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 c2cd847a15
commit ae4b1325d1
1 changed files with 2 additions and 4 deletions

View File

@ -146,10 +146,8 @@ public class NetworkTopology {
if (rack == null) { if (rack == null) {
incrementRacks(); incrementRacks();
} }
if (!(node instanceof InnerNode)) { if (depthOfAllLeaves == -1) {
if (depthOfAllLeaves == -1) { depthOfAllLeaves = node.getLevel();
depthOfAllLeaves = node.getLevel();
}
} }
} }
LOG.debug("NetworkTopology became:\n{}", this); LOG.debug("NetworkTopology became:\n{}", this);