Github user sun-rui commented on a diff in the pull request:
https://github.com/apache/spark/pull/9390#discussion_r43984910
--- Diff: core/src/main/scala/org/apache/spark/api/r/RUtils.scala ---
@@ -51,15 +59,30 @@ private[spark] object RUtils {
val isYarnClient = master != null && master.contains("yarn") &&
deployMode == "client"
// In YARN mode, the SparkR package is distributed as an archive
symbolically
- // linked to the "sparkr" file in the current directory. Note that
this does not apply
- // to the driver in client mode because it is run outside of the
cluster.
+ // linked to the "sparkr" file in the current directory and additional
R packages
+ // are distributed as an archive symbolically linked to the "rpkg"
file in the
+ // current directory.
+ //
+ // Note that this does not apply to the driver in client mode because
it is run
+ // outside of the cluster.
if (isYarnCluster || (isYarnClient && !isDriver)) {
- new File("sparkr").getAbsolutePath
+ val sparkRPkgPath = new File("sparkr").getAbsolutePath
+ val rPkgPath = new File("rpkg")
+ if (rPkgPath.exists()) {
+ Seq(sparkRPkgPath, rPkgPath.getAbsolutePath)
+ } else {
+ Seq(sparkRPkgPath)
+ }
} else {
// Otherwise, assume the package is local
// TODO: support this for Mesos
--- End diff --
Add check for running SparkR with Mesos, exit SparkSubmit in this case.
Submitted https://issues.apache.org/jira/browse/SPARK-11524 - "Support
SparkR with Mesos cluster"
---
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]