Skip to content

Commit a6f9df1

Browse files
committed
WIP using exec-style Mesos command.
1 parent 4b2b8b1 commit a6f9df1

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

core/src/main/scala/org/apache/spark/scheduler/cluster/mesos/MesosClusterScheduler.scala

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -400,9 +400,14 @@ private[spark] class MesosClusterScheduler(
400400
(cmdExecutable, ".")
401401
}
402402
val primaryResource = new File(sandboxPath, desc.jarUrl.split("/").last).toString()
403-
val cmdOptions = generateCmdOption(desc, sandboxPath).mkString(" ")
404-
val appArguments = desc.command.arguments.mkString(" ")
405-
builder.setValue(s"$executable $cmdOptions $primaryResource $appArguments")
403+
val cmdOptions = generateCmdOption(desc, sandboxPath)
404+
val appArguments = desc.command.arguments
405+
406+
builder.setShell(false)
407+
for (arg <- cmdOptions ++ Seq(primaryResource) ++ appArguments) {
408+
builder.addArguments(arg)
409+
}
410+
builder.setValue(executable)
406411
builder.setEnvironment(envBuilder.build())
407412
conf.getOption("spark.mesos.uris").map { uris =>
408413
setupUris(uris, builder)

0 commit comments

Comments
 (0)