You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@celeborn.apache.org by "pan3793 (via GitHub)" <gi...@apache.org> on 2023/06/25 15:05:01 UTC
[GitHub] [incubator-celeborn] pan3793 commented on a diff in pull request #1622: [CELEBORN-713] Local network binding support IP or FQDN
pan3793 commented on code in PR #1622:
URL: https://github.com/apache/incubator-celeborn/pull/1622#discussion_r1241216957
##########
common/src/main/scala/org/apache/celeborn/common/util/Utils.scala:
##########
@@ -396,22 +396,14 @@ object Utils extends Logging {
private var customHostname: Option[String] = sys.env.get("CELEBORN_LOCAL_HOSTNAME")
+ // for testing
def setCustomHostname(hostname: String) {
- // DEBUG code
Utils.checkHost(hostname)
customHostname = Some(hostname)
}
- def localCanonicalHostName: String = {
- customHostname.getOrElse(localIpAddress.getCanonicalHostName)
- }
-
- def localHostName: String = {
- customHostname.getOrElse(localIpAddress.getHostAddress)
- }
-
- def localHostNameForURI: String = {
- customHostname.getOrElse(InetAddresses.toUriString(localIpAddress))
+ def localHostName(conf: CelebornConf): String = customHostname.getOrElse {
+ if (conf.bindPreferIP) localIpAddress.getHostAddress else localIpAddress.getCanonicalHostName
Review Comment:
In K8s `localIpAddress.getCanonicalHostName` is the FQDN, same as result of `hostname -f`
--
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: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org