ayushtkn commented on code in PR #8540:
URL: https://github.com/apache/hadoop/pull/8540#discussion_r3426701271
##########
hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/metrics/RBFMetrics.java:
##########
@@ -379,6 +387,19 @@ public String getRouters() {
return JSON.toString(info);
}
+ private static String guessRouterWebAddress(String adminAddress, int
webPort) {
+ try {
+ if (isNullOrEmpty(adminAddress)) {
+ return "";
+ }
+ String host = adminAddress.split(":")[0];
+ return "http://" + host + ":" + webPort;
Review Comment:
how do u know it is http only, we have ``DFS_ROUTER_HTTPS_ADDRESS_KEY`` as
well
##########
hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/metrics/RBFMetrics.java:
##########
@@ -379,6 +387,19 @@ public String getRouters() {
return JSON.toString(info);
}
+ private static String guessRouterWebAddress(String adminAddress, int
webPort) {
Review Comment:
guess isn't a very nice word here & moreover we can't rely on guesswork
either
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]