Skip to content

Commit

Permalink
WIP using exec-style Mesos command.
Browse files Browse the repository at this point in the history
  • Loading branch information
dragos committed Feb 16, 2016
1 parent 4b2b8b1 commit a6f9df1
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -400,9 +400,14 @@ private[spark] class MesosClusterScheduler(
(cmdExecutable, ".")
}
val primaryResource = new File(sandboxPath, desc.jarUrl.split("/").last).toString()
val cmdOptions = generateCmdOption(desc, sandboxPath).mkString(" ")
val appArguments = desc.command.arguments.mkString(" ")
builder.setValue(s"$executable $cmdOptions $primaryResource $appArguments")
val cmdOptions = generateCmdOption(desc, sandboxPath)
val appArguments = desc.command.arguments

builder.setShell(false)
for (arg <- cmdOptions ++ Seq(primaryResource) ++ appArguments) {
builder.addArguments(arg)
}
builder.setValue(executable)
builder.setEnvironment(envBuilder.build())
conf.getOption("spark.mesos.uris").map { uris =>
setupUris(uris, builder)
Expand Down

1 comment on commit a6f9df1

@jayv
Copy link

@jayv jayv commented on a6f9df1 Feb 16, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Please sign in to comment.