Hey Bernerd,

There isn't great documentation on the state abstraction but the code is
here<https://github.com/apache/mesos/tree/master/src/java/src/org/apache/mesos/state>
(and
it's included in the mesos.jar). The best documentation is really it's use
in Chronos and Marathon.

Also, we're working on the logical equivalent of a StatefulSchedulerDriver
that does state management of your tasks for you (including reconciliation
with the master), so you'll still just call launchTasks. The goal is to
make writing framework schedulers really easy.

Ben.

P.S. If you're interested I'm happy to elaborate on why we pushed state to
the framework schedulers.


On Wed, Sep 18, 2013 at 9:12 AM, Bernerd Schaefer <[email protected]>wrote:

> Thanks, Tobi
>
> In Marathon's case there are a couple of things in place to ensure
>> reliable launching.
>> Marathon tracks tasks via the Mesos state abstraction (backed by ZK) so
>> it can recover after getting disconnected.
>> It only considers a task running after it received a TASK_RUNNING from
>> Mesos:
>>
>> https://github.com/mesosphere/marathon/blob/master/src/main/scala/mesosphere/marathon/MarathonScheduler.scala#L107-L109
>>
>
> Is there more information about the state abstraction? Also, unless I'm
> missing something, the flow is: mark task as starting, call launchTasks,
> wait for confirmation of running. So if the launchTasks message is not
> delivered, the task will stay in the "starting" state, even though Mesos
> doesn't know about it. Is there another component that re-queues tasks that
> seem to be stuck in starting?
>
> Bernerd
>
>

Reply via email to