smengcl commented on a change in pull request #2565:
URL: https://github.com/apache/ozone/pull/2565#discussion_r695103932
##########
File path:
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/HddsUtils.java
##########
@@ -314,6 +316,48 @@ public static InetSocketAddress getReconAddresses(
return NetUtils.createSocketAddr(hostname.get(), port);
}
+ /**
+ * Retrieve the socket addresses of recon HTTP.
+ *
+ * @return Recon address
+ * @throws IllegalArgumentException If the configuration is invalid
+ */
+ public static InetSocketAddress getReconHTTPAddresses(
+ ConfigurationSource conf) {
+ String name = conf.get(OZONE_RECON_HTTP_ADDRESS_KEY);
Review comment:
Yes. We (at least) need the port from
`OZONE_RECON_HTTP_ADDRESS_KEY`/`OZONE_RECON_HTTPS_ADDRESS_KEY`.
The logic could be:
If address in `OZONE_RECON_HTTP_ADDRESS_KEY`/`OZONE_RECON_HTTPS_ADDRESS_KEY`
is set, we should use the address from them.
But if address in
`OZONE_RECON_HTTP_ADDRESS_KEY`/`OZONE_RECON_HTTPS_ADDRESS_KEY` is **not** set,
we should attampt to fallback to the address in `OZONE_RECON_ADDRESS_KEY`
(exclude the port). And use the default port from
`OZONE_RECON_HTTP_ADDRESS_KEY`/`OZONE_RECON_HTTPS_ADDRESS_KEY` in this case.
--
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]