You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by GitBox <gi...@apache.org> on 2022/03/23 00:06:04 UTC

[GitHub] [hadoop] xinglin commented on a change in pull request #4091: HDFS-16517 Distance metric is wrong for non-DN machines in 2.10.

xinglin commented on a change in pull request #4091:
URL: https://github.com/apache/hadoop/pull/4091#discussion_r832726638



##########
File path: hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/NetworkTopology.java
##########
@@ -823,7 +823,7 @@ private static int getWeightUsingNetworkLocation(Node reader, Node node) {
           }
           currentLevel++;
         }
-        weight = (readerPathToken.length - currentLevel) +
+        weight = 2 + (readerPathToken.length - currentLevel) +

Review comment:
       nit: could we move "2 + " to the end of the next line, so that it is identical to what is in trunk? 
   
   ```
           weight = (readerPathToken.length - currentLevel) +
               (nodePathToken.length - currentLevel) + 2;
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org