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

Class Executor

src/python/interface/src/mesos/interface/__init__.py:312–376  ·  view source on GitHub ↗

Base class for Mesos executors. Users' executors should extend this class to get default implementations of methods they don't override.

Source from the content-addressed store, hash-verified

310 """
311
312class Executor(object):
313 """
314 Base class for Mesos executors. Users' executors should extend this
315 class to get default implementations of methods they don't override.
316 """
317
318 def registered(self, driver, executorInfo, frameworkInfo, slaveInfo):
319 """
320 Invoked once the executor driver has been able to successfully connect
321 with Mesos. In particular, a scheduler can pass some data to its
322 executors through the FrameworkInfo.ExecutorInfo's data field.
323 """
324
325 def reregistered(self, driver, slaveInfo):
326 """
327 Invoked when the executor reregisters with a restarted slave.
328 """
329
330 def disconnected(self, driver):
331 """
332 Invoked when the executor becomes "disconnected" from the slave (e.g.,
333 the slave is being restarted due to an upgrade).
334 """
335
336 def launchTask(self, driver, task):
337 """
338 Invoked when a task has been launched on this executor (initiated via
339 Scheduler.launchTasks). Note that this task can be realized with a
340 thread, a process, or some simple computation, however, no other
341 callbacks will be invoked on this executor until this callback has
342 returned.
343 """
344
345 def killTask(self, driver, taskId):
346 """
347 Invoked when a task running within this executor has been killed (via
348 SchedulerDriver.killTask). Note that no status update will be sent on
349 behalf of the executor, the executor is responsible for creating a new
350 TaskStatus (i.e., with TASK_KILLED) and invoking ExecutorDriver's
351 sendStatusUpdate.
352 """
353
354 def frameworkMessage(self, driver, message):
355 """
356 Invoked when a framework message has arrived for this executor. These
357 messages are best effort; do not expect a framework message to be
358 retransmitted in any reliable fashion.
359 """
360
361 def shutdown(self, driver):
362 """
363 Invoked when the executor should terminate all of its currently
364 running tasks. Note that after Mesos has determined that an executor
365 has terminated any tasks that the executor did not send terminal
366 status updates for (e.g., TASK_KILLED, TASK_FINISHED, TASK_FAILED,
367 etc) a TASK_LOST status update will be created.
368 """
369

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected