diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/NetworkTopology.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/NetworkTopology.java index 1f077a753bb..52cf4206ebf 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/NetworkTopology.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/NetworkTopology.java @@ -146,10 +146,8 @@ public class NetworkTopology { if (rack == null) { incrementRacks(); } - if (!(node instanceof InnerNode)) { - if (depthOfAllLeaves == -1) { - depthOfAllLeaves = node.getLevel(); - } + if (depthOfAllLeaves == -1) { + depthOfAllLeaves = node.getLevel(); } } LOG.debug("NetworkTopology became:\n{}", this);