mridulm commented on code in PR #36868:
URL: https://github.com/apache/spark/pull/36868#discussion_r898332785


##########
core/src/main/scala/org/apache/spark/rpc/RpcAddress.scala:
##########
@@ -23,7 +23,9 @@ import org.apache.spark.util.Utils
 /**
  * Address for an RPC environment, with hostname and port.
  */
-private[spark] case class RpcAddress(host: String, port: Int) {
+private[spark] case class RpcAddress(_host: String, port: Int) {
+
+  val host: String = Utils.addBracketsIfNeeded(_host)

Review Comment:
   I prefer `lazy val` - it keeps the serialized size the same, while making 
the runtime cost of accessing `host` is almost the same as before (which is 
increased by `def host`).



-- 
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]

Reply via email to