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

    https://github.com/apache/spark/pull/2516#discussion_r18911284
  
    --- Diff: 
core/src/main/scala/org/apache/spark/deploy/SparkSubmitArguments.scala ---
    @@ -227,91 +312,92 @@ private[spark] class SparkSubmitArguments(args: 
Seq[String], env: Map[String, St
          */
         def parse(opts: Seq[String]): Unit = opts match {
           case ("--name") :: value :: tail =>
    -        name = value
    +        cmdLineConfig.put(SPARK_APP_NAME, value)
             parse(tail)
     
           case ("--master") :: value :: tail =>
    -        master = value
    +        cmdLineConfig.put(SPARK_MASTER, value)
             parse(tail)
     
           case ("--class") :: value :: tail =>
    -        mainClass = value
    +        cmdLineConfig.put(SPARK_APP_CLASS, value)
             parse(tail)
     
           case ("--deploy-mode") :: value :: tail =>
    -        if (value != "client" && value != "cluster") {
    -          SparkSubmit.printErrorAndExit("--deploy-mode must be either 
\"client\" or \"cluster\"")
    -        }
    -        deployMode = value
    +        cmdLineConfig.put(SPARK_DEPLOY_MODE, value)
             parse(tail)
     
           case ("--num-executors") :: value :: tail =>
    -        numExecutors = value
    +        cmdLineConfig.put(SPARK_EXECUTOR_INSTANCES, value)
             parse(tail)
     
           case ("--total-executor-cores") :: value :: tail =>
    -        totalExecutorCores = value
    +        cmdLineConfig.put(SPARK_CORES_MAX, value)
             parse(tail)
     
           case ("--executor-cores") :: value :: tail =>
    -        executorCores = value
    +        cmdLineConfig.put(SPARK_EXECUTOR_CORES, value)
             parse(tail)
     
           case ("--executor-memory") :: value :: tail =>
    -        executorMemory = value
    +        cmdLineConfig.put(SPARK_EXECUTOR_MEMORY, value)
             parse(tail)
     
           case ("--driver-memory") :: value :: tail =>
    -        driverMemory = value
    +        cmdLineConfig.put(SPARK_DRIVER_MEMORY, value)
             parse(tail)
     
           case ("--driver-cores") :: value :: tail =>
    -        driverCores = value
    +        cmdLineConfig.put(SPARK_DRIVER_CORES, value)
             parse(tail)
     
           case ("--driver-class-path") :: value :: tail =>
    -        driverExtraClassPath = value
    +        cmdLineConfig.put(SPARK_DRIVER_EXTRA_CLASSPATH, value)
             parse(tail)
     
           case ("--driver-java-options") :: value :: tail =>
    -        driverExtraJavaOptions = value
    +        cmdLineConfig.put(SPARK_DRIVER_EXTRA_JAVA_OPTIONS, value)
             parse(tail)
     
           case ("--driver-library-path") :: value :: tail =>
    -        driverExtraLibraryPath = value
    +        cmdLineConfig.put(SPARK_DRIVER_EXTRA_LIBRARY_PATH, value)
             parse(tail)
     
           case ("--properties-file") :: value :: tail =>
    -        propertiesFile = value
    +        /*  We merge the property file config options into the rest of the 
command lines options
    +         *  after we have finished the rest of the command line processing 
as property files
    +         *  cannot override explicit command line options .
    +         */
    +        cmdLinePropertyFileValues ++= 
Utils.getPropertyValuesFromFile(value)
    --- End diff --
    
    So, this is actually introducing different behavior from before.
    
    A command line like this:
    
        --properties-file foo --properties-file bar
    
    Would only load "bar" before, but now it's loading both.


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