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

Method killTask

src/executor/v0_v1executor.cpp:117–138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

115 void disconnected() {}
116
117 void killTask(const mesos::TaskID& taskId)
118 {
119 // Logically an executor cannot receive any response from an agent if it
120 // is not connected. Since we have received `killTask`, we assume we are
121 // connected and trigger the `connected` callback to enable event delivery.
122 // This satisfies the invariant of the v1 interface that an executor can
123 // receive an event only after successfully connecting with the agent.
124 if (!connected) {
125 LOG(INFO) << "Implicitly connecting the executor to kill a task";
126 callbacks.connected();
127 connected = true;
128 }
129
130 Event event;
131 event.set_type(Event::KILL);
132
133 Event::Kill* kill = event.mutable_kill();
134
135 kill->mutable_task_id()->CopyFrom(evolve(taskId));
136
137 received(event);
138 }
139
140 void launchTask(const mesos::TaskInfo& task)
141 {

Callers

nothing calls this directly

Calls 3

CopyFromMethod · 0.80
connectedMethod · 0.65
evolveFunction · 0.50

Tested by

no test coverage detected