This is an automated email from the ASF dual-hosted git repository.

ayushsaxena pushed a commit to branch branch-3.1
in repository https://gitbox.apache.org/repos/asf/hadoop.git


The following commit(s) were added to refs/heads/branch-3.1 by this push:
     new 9434f36  HADOOP-16662. Remove unnecessary InnerNode check in 
NetworkTopology#add(). Contributed by Lisheng Sun.
9434f36 is described below

commit 9434f36b436b15663c5e1b2739fe3c46aaef35ad
Author: Ayush Saxena <[email protected]>
AuthorDate: Sat Oct 19 11:05:54 2019 +0530

    HADOOP-16662. Remove unnecessary InnerNode check in NetworkTopology#add(). 
Contributed by Lisheng Sun.
---
 .../src/main/java/org/apache/hadoop/net/NetworkTopology.java        | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

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 997ff7d..dea8f2a 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);


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to