Github user sameeragarwal commented on a diff in the pull request:

    https://github.com/apache/spark/pull/17821#discussion_r114445132
  
    --- Diff: core/src/main/scala/org/apache/spark/deploy/worker/Worker.scala 
---
    @@ -266,7 +289,8 @@ private[deploy] class Worker(
                 if (registerMasterFutures != null) {
                   registerMasterFutures.foreach(_.cancel(true))
                 }
    -            val masterAddress = masterRef.address
    +            val masterAddress =
    +              if (preferConfiguredMasterAddress) 
masterAddressToConnect.get else masterRef.address
    --- End diff --
    
    Perhaps it isn't an issue but do you think we should fall back to 
`masterRef.address` in case `masterAddressToConnect` isn't set (instead of 
throwing a generic scala exception)? Something along the lines of:
    
    ```scala
    val masterAddress = masterAddressToConnect match {
      case Some(master) if preferConfiguredMasterAddress => master
      case _ => masterRef.address
    }
    ```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to