[SPARK-12979][MESOS] Don’t resolve paths on the local file system in Mesos scheduler
The driver filesystem is likely different from where the executors will run, so resolving paths (and symlinks, etc.) will lead to invalid paths on executors. Author: Iulian Dragos <jaguarul@gmail.com> Closes #10923 from dragos/issue/canonical-paths.
This commit is contained in:
parent
a41b68b954
commit
c9b89a0a09
|
@ -179,7 +179,7 @@ private[spark] class CoarseMesosSchedulerBackend(
|
|||
.orElse(Option(System.getenv("SPARK_EXECUTOR_URI")))
|
||||
|
||||
if (uri.isEmpty) {
|
||||
val runScript = new File(executorSparkHome, "./bin/spark-class").getCanonicalPath
|
||||
val runScript = new File(executorSparkHome, "./bin/spark-class").getPath
|
||||
command.setValue(
|
||||
"%s \"%s\" org.apache.spark.executor.CoarseGrainedExecutorBackend"
|
||||
.format(prefixEnv, runScript) +
|
||||
|
|
|
@ -394,7 +394,7 @@ private[spark] class MesosClusterScheduler(
|
|||
.getOrElse {
|
||||
throw new SparkException("Executor Spark home `spark.mesos.executor.home` is not set!")
|
||||
}
|
||||
val cmdExecutable = new File(executorSparkHome, "./bin/spark-submit").getCanonicalPath
|
||||
val cmdExecutable = new File(executorSparkHome, "./bin/spark-submit").getPath
|
||||
// Sandbox points to the current directory by default with Mesos.
|
||||
(cmdExecutable, ".")
|
||||
}
|
||||
|
|
|
@ -125,7 +125,7 @@ private[spark] class MesosSchedulerBackend(
|
|||
|
||||
val executorBackendName = classOf[MesosExecutorBackend].getName
|
||||
if (uri.isEmpty) {
|
||||
val executorPath = new File(executorSparkHome, "/bin/spark-class").getCanonicalPath
|
||||
val executorPath = new File(executorSparkHome, "/bin/spark-class").getPath
|
||||
command.setValue(s"$prefixEnv $executorPath $executorBackendName")
|
||||
} else {
|
||||
// Grab everything to the first '.'. We'll use that and '*' to
|
||||
|
|
Loading…
Reference in a new issue