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

    https://github.com/apache/spark/pull/9287#discussion_r44053516
  
    --- Diff: 
core/src/main/scala/org/apache/spark/deploy/master/MasterArguments.scala ---
    @@ -24,30 +24,35 @@ import org.apache.spark.util.{IntParam, Utils}
      * Command-line parser for the master.
      */
     private[master] class MasterArguments(args: Array[String], conf: 
SparkConf) {
    +  import Master._
    +
       var host = Utils.localHostName()
    -  var port = 7077
    -  var webUiPort = 8080
    +  var port = DefaultRpcPort
    +  var webUiPort = DefaultWebUIPort
    +  var rpcSubmissionPort = DefaultRpcSubmissionPort
    +  var restSubmissionPort = DefaultRestSubmissionPort
       var propertiesFile: String = null
     
       // Check for settings in environment variables
    -  if (System.getenv("SPARK_MASTER_HOST") != null) {
    -    host = System.getenv("SPARK_MASTER_HOST")
    -  }
    -  if (System.getenv("SPARK_MASTER_PORT") != null) {
    -    port = System.getenv("SPARK_MASTER_PORT").toInt
    -  }
    -  if (System.getenv("SPARK_MASTER_WEBUI_PORT") != null) {
    -    webUiPort = System.getenv("SPARK_MASTER_WEBUI_PORT").toInt
    -  }
    +  sys.env.get("SPARK_MASTER_HOST").foreach(v => host = v)
    +  sys.env.get("SPARK_MASTER_PORT").foreach(v => port = v.toInt)
    +  sys.env.get("SPARK_MASTER_WEBUI_PORT").foreach(v => webUiPort = v.toInt)
    +
    +  
sys.env.get("SPARK_MASTER_SUBMISSION_RPC_PORT").orElse(sys.env.get("SPARK_MASTER_PORT"))
    --- End diff --
    
    Why add a new name for the env variable? Is `SPARK_MASTER_PORT` gonna 
change meaning because of this change?
    
    Changing configuration is kinda bad because you still need to keep the old 
code, and need to educate users on the new values. So unless there's a very 
good reason for the change, I don't see the point.


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to