Github user WangTaoTheTonic commented on the pull request:

    https://github.com/apache/spark/pull/2955#issuecomment-60566095
  
    Guess I didn't make it clear. So I paste some code segment to help. Excuse 
me for this.
    
    In ClientBase.scala we could see:
    ` val amClass =
          if (isLaunchingDriver) {
            
Class.forName("org.apache.spark.deploy.yarn.ApplicationMaster").getName
          } else {
            
Class.forName("org.apache.spark.deploy.yarn.ExecutorLauncher").getName
          }
        val userArgs = args.userArgs.flatMap { arg =>
          Seq("--arg", YarnSparkHadoopUtil.escapeForShell(arg))
        }
        val amArgs =
          Seq(amClass) ++ userClass ++ userJar ++ userArgs ++
          Seq(
            "--executor-memory", args.executorMemory.toString,
            "--executor-cores", args.executorCores.toString,
            "--num-executors ", args.numExecutors.toString)`
    That is to say, we init an `ApplicationMaster` here using args 
`"--executor-memory", args.executorMemory.toString,`.
    
    Here `args` in `args.executorMemory` is an `ClientArguments` instance in 
which `executorMemory` is a number.
    
    So in common scene we would not directly init `ApplicationMaster` (even we 
could do), `ApplicationMaster` usuarlly is inited in `ClientBase` class.
    
    Did I make it clear ? -______-


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