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

    https://github.com/apache/spark/pull/2350#discussion_r17397870
  
    --- Diff: 
yarn/common/src/main/scala/org/apache/spark/deploy/yarn/ClientBase.scala ---
    @@ -396,19 +352,27 @@ trait ClientBase extends Logging {
           } else {
             Nil
           }
    +    val userJar =
    +      if (args.userJar != null) {
    +        Seq("--jar", args.userJar)
    +      } else {
    +        Nil
    +      }
         val amClass =
           if (isLaunchingDriver) {
             classOf[ApplicationMaster].getName()
           } else {
             classOf[ApplicationMaster].getName().replace("ApplicationMaster", 
"ExecutorLauncher")
           }
    +    val userArgs = args.userArgs.flatMap { arg =>
    +      Seq("--arg", YarnSparkHadoopUtil.escapeForShell(arg))
    +    }
         val amArgs =
    -      Seq(amClass) ++ userClass ++
    -      (if (args.userJar != null) Seq("--jar", args.userJar) else Nil) ++
    -      Seq("--executor-memory", args.executorMemory.toString,
    +      Seq(amClass) ++ userClass ++ userJar ++ userArgs ++
    +      Seq(
    +        "--executor-memory", args.executorMemory.toString,
             "--executor-cores", args.executorCores.toString,
    -        "--num-executors ", args.numExecutors.toString,
    -        userArgsToString(args))
    --- End diff --
    
    This old code seems incorrect to me. `userArgsToString` returns a `String`, 
but what we want is a `Seq("--arg", "1", "--arg", "2", "--arg", "3")`. @vanzin 
Can you verify this?


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