HADOOP-16662. Remove unnecessary InnerNode check in NetworkTopology#add(). Contributed by Lisheng Sun.
This commit is contained in:
parent
c2cd847a15
commit
ae4b1325d1
|
@ -146,12 +146,10 @@ 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);
|
||||||
} finally {
|
} finally {
|
||||||
netlock.writeLock().unlock();
|
netlock.writeLock().unlock();
|
||||||
|
|
Loading…
Reference in New Issue