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

    https://github.com/apache/spark/pull/969#discussion_r13738885
  
    --- Diff: 
yarn/common/src/main/scala/org/apache/spark/deploy/yarn/ClientBase.scala ---
    @@ -220,10 +220,21 @@ trait ClientBase extends Logging {
           }
         }
     
    +    def getArg(arg: String, envVar: String, sysProp: String): String = {
    +      if (arg != null && !arg.isEmpty) {
    +        arg
    +      } else if (System.getenv(envVar) != null && 
!System.getenv(envVar).isEmpty) {
    +        System.getenv(envVar)
    +      } else {
    +        sparkConf.getOption(sysProp).orNull
    +      }
    +    }
         var cachedSecondaryJarLinks = ListBuffer.empty[String]
    -    val fileLists = List( (args.addJars, LocalResourceType.FILE, true),
    -      (args.files, LocalResourceType.FILE, false),
    -      (args.archives, LocalResourceType.ARCHIVE, false) )
    +    val fileLists = List((args.addJars, LocalResourceType.FILE, true),
    +      (getArg(args.files, "SPARK_YARN_DIST_FILES", 
"spark.yarn.dist.files"),
    +        LocalResourceType.FILE, false),
    +      (getArg(args.archives, "SPARK_YARN_DIST_ARCHIVES", 
"spark.yarn.dist.archives"),
    --- End diff --
    
    I see, Weekend, I will test your branch, Please merge the master changes.


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

Reply via email to