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

    https://github.com/apache/spark/pull/11603#discussion_r55658115
  
    --- Diff: core/src/main/scala/org/apache/spark/deploy/SparkSubmit.scala ---
    @@ -452,27 +451,15 @@ object SparkSubmit {
           OptionAssigner(args.driverExtraLibraryPath, ALL_CLUSTER_MGRS, 
ALL_DEPLOY_MODES,
             sysProp = "spark.driver.extraLibraryPath"),
     
    -      // Yarn client only
    -      OptionAssigner(args.queue, YARN, CLIENT, sysProp = 
"spark.yarn.queue"),
    +      // Yarn only
    +      OptionAssigner(args.queue, YARN, ALL_DEPLOY_MODES, sysProp = 
"spark.yarn.queue"),
           OptionAssigner(args.numExecutors, YARN, ALL_DEPLOY_MODES,
             sysProp = "spark.executor.instances"),
    -      OptionAssigner(args.files, YARN, CLIENT, sysProp = 
"spark.yarn.dist.files"),
    -      OptionAssigner(args.archives, YARN, CLIENT, sysProp = 
"spark.yarn.dist.archives"),
    -      OptionAssigner(args.principal, YARN, CLIENT, sysProp = 
"spark.yarn.principal"),
    -      OptionAssigner(args.keytab, YARN, CLIENT, sysProp = 
"spark.yarn.keytab"),
    -
    -      // Yarn cluster only
    -      OptionAssigner(args.name, YARN, CLUSTER, clOption = "--name"),
    -      OptionAssigner(args.driverMemory, YARN, CLUSTER, clOption = 
"--driver-memory"),
    -      OptionAssigner(args.driverCores, YARN, CLUSTER, clOption = 
"--driver-cores"),
    -      OptionAssigner(args.queue, YARN, CLUSTER, clOption = "--queue"),
    -      OptionAssigner(args.executorMemory, YARN, CLUSTER, clOption = 
"--executor-memory"),
    -      OptionAssigner(args.executorCores, YARN, CLUSTER, clOption = 
"--executor-cores"),
    -      OptionAssigner(args.files, YARN, CLUSTER, clOption = "--files"),
    -      OptionAssigner(args.archives, YARN, CLUSTER, clOption = 
"--archives"),
    -      OptionAssigner(args.jars, YARN, CLUSTER, clOption = "--addJars"),
    -      OptionAssigner(args.principal, YARN, CLUSTER, clOption = 
"--principal"),
    -      OptionAssigner(args.keytab, YARN, CLUSTER, clOption = "--keytab"),
    +      OptionAssigner(args.jars, YARN, ALL_DEPLOY_MODES, sysProp = 
"spark.yarn.dist.jars"),
    --- End diff --
    
    Here I put all the additional jars into a configuration 
`spark.yarn.dist.jars`, this will be picked by yarn/client and put into 
distributed cache. So now both in yarn client and cluster mode, additional jars 
will be put into distributed cache.
    
    Another thing is that do we need to put user jar into distributed cache for 
yarn client mode, I think it is doable, not sure is there any special concern?


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