You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mesos.apache.org by Vladimir Vivien <vl...@gmail.com> on 2014/06/29 16:52:00 UTC
Help in Understanding SchedulerProcess.Stop(failover)
Looking at the code in SchedulerProcess.Stop(failover) in sched.cpp, it
looks like the framework is unregistered only when when failover = false.
Is it the case when failover = true that the stop command is ignored ?
==== sched.cpp ====
void stop(bool failover)
{
LOG(INFO) << "Stopping framework '" << framework.id() << "'";
// Whether or not we send an unregister message, we want to
// terminate this process.
terminate(self());
if (connected && !failover) {
UnregisterFrameworkMessage message;
message.mutable_framework_id()->MergeFrom(framework.id());
CHECK_SOME(master);
send(master.get(), message);
}
Lock lock(mutex);
pthread_cond_signal(cond);
}
--
Vladimir Vivien
Re: Help in Understanding SchedulerProcess.Stop(failover)
Posted by Vladimir Vivien <vl...@gmail.com>.
Helps a lot. Thanks.
On Sun, Jun 29, 2014 at 10:59 AM, Benjamin Hindman <be...@eecs.berkeley.edu>
wrote:
> Calling 'stop(true)' will still stop the driver (we need to invoke
> 'terminate(self())'), but it won't send an unregister to the master. Hope
> that helps.
>
>
> On Sun, Jun 29, 2014 at 7:52 AM, Vladimir Vivien <
> vladimir.vivien@gmail.com>
> wrote:
>
> > Looking at the code in SchedulerProcess.Stop(failover) in sched.cpp, it
> > looks like the framework is unregistered only when when failover =
> false.
> > Is it the case when failover = true that the stop command is ignored ?
> >
> > ==== sched.cpp ====
> > void stop(bool failover)
> > {
> > LOG(INFO) << "Stopping framework '" << framework.id() << "'";
> >
> > // Whether or not we send an unregister message, we want to
> > // terminate this process.
> > terminate(self());
> >
> > if (connected && !failover) {
> > UnregisterFrameworkMessage message;
> > message.mutable_framework_id()->MergeFrom(framework.id());
> > CHECK_SOME(master);
> > send(master.get(), message);
> > }
> >
> > Lock lock(mutex);
> > pthread_cond_signal(cond);
> > }
> >
> > --
> > Vladimir Vivien
> >
>
--
Vladimir Vivien
Re: Help in Understanding SchedulerProcess.Stop(failover)
Posted by Benjamin Hindman <be...@eecs.berkeley.edu>.
Calling 'stop(true)' will still stop the driver (we need to invoke
'terminate(self())'), but it won't send an unregister to the master. Hope
that helps.
On Sun, Jun 29, 2014 at 7:52 AM, Vladimir Vivien <vl...@gmail.com>
wrote:
> Looking at the code in SchedulerProcess.Stop(failover) in sched.cpp, it
> looks like the framework is unregistered only when when failover = false.
> Is it the case when failover = true that the stop command is ignored ?
>
> ==== sched.cpp ====
> void stop(bool failover)
> {
> LOG(INFO) << "Stopping framework '" << framework.id() << "'";
>
> // Whether or not we send an unregister message, we want to
> // terminate this process.
> terminate(self());
>
> if (connected && !failover) {
> UnregisterFrameworkMessage message;
> message.mutable_framework_id()->MergeFrom(framework.id());
> CHECK_SOME(master);
> send(master.get(), message);
> }
>
> Lock lock(mutex);
> pthread_cond_signal(cond);
> }
>
> --
> Vladimir Vivien
>