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

    https://github.com/apache/spark/pull/6743#discussion_r33702691
  
    --- Diff: core/src/main/scala/org/apache/spark/deploy/SparkSubmit.scala ---
    @@ -339,6 +341,23 @@ object SparkSubmit {
           }
         }
     
    +    // In yarn mode for an R app, add the SparkR package archive to 
archives
    +    // that can be distributed with the job
    +    if (args.isR && clusterManager == YARN) {
    +      val rPackagePath = RUtils.localSparkRPackagePath
    +      if (rPackagePath.isEmpty) {
    +        printErrorAndExit("SPARK_HOME does not exist for R application in 
yarn mode.")
    +      }
    +      val rPackageFile = new File(rPackagePath.get, SPARKR_PACKAGE_ARCHIVE)
    +      if (!rPackageFile.exists()) {
    +        printErrorAndExit(s"$SPARKR_PACKAGE_ARCHIVE does not exist for R 
application in yarn mode.")
    +      }
    +      val localURI = Utils.resolveURI(rPackageFile.getAbsolutePath)
    +
    +      // Assigns a symbol link name "sparkr" to the shipped package.
    +      args.archives = mergeFileLists(args.archives, localURI.toString + 
"#sparkr")
    +    }
    --- End diff --
    
    github won't let me comment down there, but in L388 of this file we should 
add the deploy mode to a system property:
    ```
    OptionAssigner(args.deployMode, ALL_CLUSTER_MGRS, ALL_DEPLOY_MODES,
      sysProp = "spark.submit.deployMode")
    ```


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