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

    https://github.com/apache/spark/pull/11603#discussion_r57477923
  
    --- Diff: yarn/src/main/scala/org/apache/spark/deploy/yarn/Client.scala ---
    @@ -480,25 +495,16 @@ private[spark] class Client(
         }
     
         /**
    -     * Copy a few resources to the distributed cache if their scheme is 
not "local".
    +     * Copy user jar to the distributed cache if their scheme is not 
"local".
          * Otherwise, set the corresponding key in our SparkConf to handle it 
downstream.
    -     * Each resource is represented by a 3-tuple of:
    -     *   (1) destination resource name,
    -     *   (2) local path to the resource,
    -     *   (3) Spark property key to set if the scheme is not local
          */
    -    List(
    -      (APP_JAR_NAME, args.userJar, APP_JAR),
    -      ("log4j.properties", oldLog4jConf.orNull, null)
    -    ).foreach { case (destName, path, confKey) =>
    -      if (path != null && !path.trim().isEmpty()) {
    -        val (isLocal, localizedPath) = distribute(path, destName = 
Some(destName))
    -        if (isLocal && confKey != null) {
    -          require(localizedPath != null, s"Path $path already 
distributed.")
    -          // If the resource is intended for local use only, handle this 
downstream
    -          // by setting the appropriate property
    -          sparkConf.set(confKey, localizedPath)
    -        }
    +    for (jar <- Option(args.userJar); if !jar.trim.isEmpty) {
    --- End diff --
    
    minor: I slightly prefer 
`Option(args.userJar).filter(_.trim().nonEmpty()).foreach { jar =>`


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