You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/06/15 17:23:02 UTC

[GitHub] [spark] mridulm commented on a diff in pull request #36868: [SPARK-39468][CORE] Improve `RpcAddress` to add `[]` to `IPv6` if needed

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


##########
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:
   This can be a `lazy val` instead of `val` ?
   We end up almost doubling the size of the serialized instance of this object otherwise.



-- 
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: reviews-unsubscribe@spark.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org