You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mesos.apache.org by "Benjamin Mahler (JIRA)" <ji...@apache.org> on 2013/07/18 23:48:48 UTC

[jira] [Created] (MESOS-579) Refactor the Isolator to return Futures and wrap a libprocess Process.

Benjamin Mahler created MESOS-579:
-------------------------------------

             Summary: Refactor the Isolator to return Futures and wrap a libprocess Process.
                 Key: MESOS-579
                 URL: https://issues.apache.org/jira/browse/MESOS-579
             Project: Mesos
          Issue Type: Task
            Reporter: Benjamin Mahler


Currently the Isolator interface _is_ a libprocess Process:

class Isolator : public process::Process<Isolator>
{
  ...
  virtual void killExecutor(
      const FrameworkID& frameworkId,
      const ExecutorID& executorId) = 0;
  ...
}

This has led to issues where we've accidentally called directly into Isolator (instead of dispatching). We should make Isolator a wrapper around a libprocess Process.

Second, the Isolator should return Futures rather than calling back into the slave. We currently have to construct the ProcessIsolator / CgroupsIsolator by passing in the Slave PID, so that they can dispatch back into the slave to notify when the executor has exited (for example). We can eliminate the need for this by returning Futures!

class Isolator
{
  ...
  // Returns a Future that becomes ready when the executor has been killed.
  // Exited contains the status and message.
  virtual Future<Exited> killExecutor(
      const FrameworkID& frameworkId,
      const ExecutorID& executorId);
  {
    return dispatch(isolator, &IsolatorProcess::killExecutor, frameworkId, executorId);
  }
  ...

private:
  IsolatorProcess* isolator;
}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira