xiaoyuyao commented on a change in pull request #1044:
URL: https://github.com/apache/hadoop-ozone/pull/1044#discussion_r439589149
##########
File path:
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/scm/net/NetUtils.java
##########
@@ -59,9 +64,12 @@ public static String normalize(String path) {
+ NetConstants.PATH_SEPARATOR_STR + ": " + path);
}
+ if (len == 1 || path.charAt(len - 1) != NetConstants.PATH_SEPARATOR) {
Review comment:
You are correct. The node to location mapping is provided by script or
mapping file configured and parsed by implementation of DNSToSwitchMapping. The
script should usually normalize the path already. Otherwise,
the mapping can't be used consistently for the topology class to determine
node locations.
E.g., multiple slash: "///" => ""
multiple slash in the middle "/a//b/c/" => "/a//b/c" which is not equal to
"/a/b/c", etc.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]