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/04/18 12:39:27 UTC

[GitHub] [incubator-celeborn] pan3793 commented on a diff in pull request #1436: [CELEBORN-534] Respect the user's configured master host settings

pan3793 commented on code in PR #1436:
URL: https://github.com/apache/incubator-celeborn/pull/1436#discussion_r1169974103


##########
master/src/main/scala/org/apache/celeborn/service/deploy/master/clustermeta/ha/MasterNode.scala:
##########
@@ -79,9 +86,22 @@ object MasterNode {
       this
     }
 
-    def build: MasterNode = MasterNode(
-      nodeId,
-      new InetSocketAddress(ratisHost, ratisPort),
-      new InetSocketAddress(rpcHost, rpcPort))
+    def build: MasterNode = MasterNode(nodeId, ratisHost, ratisPort, rpcHost, rpcPort)
+  }
+
+  private def createSocketAddr(host: String, port: Int): InetSocketAddress = {
+    val socketAddr: InetSocketAddress =
+      Try(NetUtils.createSocketAddr(host, port)) match {

Review Comment:
   nit: use `try catch` 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: issues-unsubscribe@celeborn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org