You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mesos.apache.org by "Brendan Chang (JIRA)" <ji...@apache.org> on 2015/06/19 00:59:03 UTC

[jira] [Created] (MESOS-2896) Can't mock queued_tasks in slave tests

Brendan Chang created MESOS-2896:
------------------------------------

             Summary: Can't mock queued_tasks in slave tests
                 Key: MESOS-2896
                 URL: https://issues.apache.org/jira/browse/MESOS-2896
             Project: Mesos
          Issue Type: Improvement
          Components: slave, test
            Reporter: Brendan Chang
            Priority: Minor


The issue of tracking queued_tasks in an executor resulted from [MESOS-2598|https://issues.apache.org/jira/browse/MESOS-2598].

When frameworks are run, tasks are queued and then immediately launched on the executor, so it is difficult to isolate the slave state when tasks are still queued (i.e. tasks are in queued_tasks[] and not tasks[] or completed_tasks[] in state.json).

In slave.cpp:_runTask(), tasks are queued on the executor only when the executor has not yet registered or it is currently running:

{code}
    case Executor::REGISTERING:
      // Checkpoint the task before we do anything else.
      if (executor->checkpoint) {
        executor->checkpointTask(task);
      }

      // Queue task if the executor has not yet registered.
      LOG(INFO) << "Queuing task '" << task.task_id()
                  << "' for executor " << executorId
                  << " of framework '" << frameworkId;

      executor->queuedTasks[task.task_id()] = task;
      break;
    case Executor::RUNNING: {
      // Checkpoint the task before we do anything else.
      if (executor->checkpoint) {
        executor->checkpointTask(task);
      }

      // Queue task until the containerizer is updated with new
      // resource limits (MESOS-998).
      LOG(INFO) << "Queuing task '" << task.task_id()
                  << "' for executor " << executorId
                  << " of framework '" << frameworkId;

      executor->queuedTasks[task.task_id()] = task;
{code}

It is difficult to catch the executor in either of these states with queued tasks.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)