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

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


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

commit f6c7fab8f0f1827948a45edb4bb17e46573e809c
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 1f077a7..52cf420 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