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

Method runTaskGroup

src/slave/slave.cpp:3921–3962  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3919
3920
3921void Slave::runTaskGroup(
3922 const UPID& from,
3923 const FrameworkInfo& frameworkInfo,
3924 const ExecutorInfo& executorInfo,
3925 const TaskGroupInfo& taskGroupInfo,
3926 const vector<ResourceVersionUUID>& resourceVersionUuids,
3927 const Option<bool>& launchExecutor)
3928{
3929 if (master != from) {
3930 LOG(WARNING) << "Ignoring run task group message from " << from
3931 << " because it is not the expected master: "
3932 << (master.isSome() ? stringify(master.get()) : "None");
3933 return;
3934 }
3935
3936 if (!frameworkInfo.has_id()) {
3937 LOG(ERROR) << "Ignoring run task group message from " << from
3938 << " because it does not have a framework ID";
3939 return;
3940 }
3941
3942 // TODO(mzhu): Consider doing a `CHECK` here since this shouldn't be possible.
3943 if (taskGroupInfo.tasks().empty()) {
3944 LOG(ERROR) << "Ignoring run task group message from " << from
3945 << " for framework " << frameworkInfo.id()
3946 << " because it has no tasks";
3947
3948 return;
3949 }
3950
3951 // Executors for task groups are injected by the master, not the agent.
3952 constexpr bool executorGeneratedForCommandTask = false;
3953
3954 run(frameworkInfo,
3955 executorInfo,
3956 None(),
3957 taskGroupInfo,
3958 resourceVersionUuids,
3959 UPID(),
3960 launchExecutor,
3961 executorGeneratedForCommandTask);
3962}
3963
3964
3965void Slave::killTask(

Callers

nothing calls this directly

Calls 9

NoneClass · 0.85
stringifyFunction · 0.50
runFunction · 0.50
UPIDClass · 0.50
isSomeMethod · 0.45
getMethod · 0.45
emptyMethod · 0.45
tasksMethod · 0.45
idMethod · 0.45

Tested by

no test coverage detected