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

Method killTask

src/python/executor/src/mesos/executor/proxy_executor.cpp:171–201  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

169
170
171void ProxyExecutor::killTask(ExecutorDriver* driver,
172 const TaskID& taskId)
173{
174 InterpreterLock lock;
175
176 PyObject* taskIdObj = nullptr;
177 PyObject* res = nullptr;
178
179 taskIdObj = createPythonProtobuf(taskId, "TaskID");
180 if (taskIdObj == nullptr) {
181 goto cleanup; // createPythonProtobuf will have set an exception.
182 }
183
184 res = PyObject_CallMethod(impl->pythonExecutor,
185 (char*) "killTask",
186 (char*) "OO",
187 impl,
188 taskIdObj);
189 if (res == nullptr) {
190 cerr << "Failed to call executor's killTask" << endl;
191 goto cleanup;
192 }
193
194cleanup:
195 if (PyErr_Occurred()) {
196 PyErr_Print();
197 driver->abort();
198 }
199 Py_XDECREF(taskIdObj);
200 Py_XDECREF(res);
201}
202
203
204void ProxyExecutor::frameworkMessage(ExecutorDriver* driver,

Callers

nothing calls this directly

Calls 2

createPythonProtobufFunction · 0.85
abortMethod · 0.65

Tested by

no test coverage detected