RexXiong commented on code in PR #2713:
URL: https://github.com/apache/celeborn/pull/2713#discussion_r1741577655
##########
common/src/main/scala/org/apache/celeborn/common/util/Utils.scala:
##########
@@ -415,8 +415,33 @@ object Utils extends Logging {
customHostname = Some(hostname)
}
- def localHostName(conf: CelebornConf): String = customHostname.getOrElse {
- if (conf.bindPreferIP) {
+ def localHostName(conf: CelebornConf): String = {
+ getHostName(conf.bindPreferIP)
+ }
+
+ def localHostNameForAdvertiseAddress(conf: CelebornConf, env: String):
String = {
+ if (env.equals(RpcNameConstants.MASTER_SYS) || env.equals(
+ RpcNameConstants.MASTER_INTERNAL_SYS)) {
+ getAdvertiseAddressForMaster(conf)
+ } else {
+ getAdvertiseAddressForWorker(conf)
+ }
+ }
+
+ private def getAdvertiseAddressForMaster(conf: CelebornConf) = {
+ if (conf.masterHost != "<localhost>") {
+ conf.masterHost
Review Comment:
It seems that conf.masterHost is never equal to "<localhost>". Why not
directly call getHostName(conf.advertisePreferIP) instead?
--
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]