MCPcopy Create free account
hub / github.com/apache/mesos / defaultExecutorCommandInfo

Function defaultExecutorCommandInfo

src/slave/slave.cpp:11601–11627  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11599
11600
11601static CommandInfo defaultExecutorCommandInfo(
11602 const string& launcherDir,
11603 const Option<string>& user)
11604{
11605 Result<string> path = os::realpath(
11606 path::join(launcherDir, MESOS_DEFAULT_EXECUTOR));
11607
11608 CommandInfo commandInfo;
11609 if (path.isSome()) {
11610 commandInfo.set_shell(false);
11611 commandInfo.set_value(path.get());
11612 commandInfo.add_arguments(MESOS_DEFAULT_EXECUTOR);
11613 commandInfo.add_arguments("--launcher_dir=" + launcherDir);
11614 } else {
11615 commandInfo.set_shell(true);
11616 commandInfo.set_value(
11617 "echo '" +
11618 (path.isError() ? path.error() : "No such file or directory") +
11619 "'; exit 1");
11620 }
11621
11622 if (user.isSome()) {
11623 commandInfo.set_user(user.get());
11624 }
11625
11626 return commandInfo;
11627}
11628
11629
11630static void setLimit(Option<Value::Scalar>& limit, const Value::Scalar& delta)

Callers 1

__runMethod · 0.85

Calls 6

errorMethod · 0.65
realpathFunction · 0.50
joinFunction · 0.50
isSomeMethod · 0.45
getMethod · 0.45
isErrorMethod · 0.45

Tested by

no test coverage detected