dongjoon-hyun commented on code in PR #36868:
URL: https://github.com/apache/spark/pull/36868#discussion_r898323400


##########
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:
   Ya, of course, we can. Thank you for review, @mridulm .
   
   Actually, at the first commit, I used `def host` first to save the size . 
Later I switched to `val` in the second commit.
   - 
https://github.com/apache/spark/pull/36868/commits/ed10d51fc61612d3f7e8441a0219a62b3008e8c7
   
   If the memory consumption of `RpcAddress` instances matter, we can revert 
back `def host` instead of `lazy val`.
   
   Among three options, which one do you prefer, @mridulm and @cloud-fan ?
   1. `def host` (Initial commit)
   2. `lazy val host` (New alternative)
   3. `val host` (AS-IS)



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