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

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


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

commit 6f0a125eb5f5421f294d63d062170f041fc9420a
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 6c62a25..a21a774 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
@@ -426,10 +426,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