// NOTE: This function informs the master to stop attempting to send // messages to this scheduler. The abort flag stops any already // enqueued messages or messages in flight from being handled. We // don't want to terminate the process because one might do a // MesosSchedulerDriver::stop later, which dispatches to // SchedulerProcess::stop. void abort() { LOG(INFO) << "Aborting framework '" << framework.id() << "'"; CHECK(aborted); if (!connected) { VLOG(1) << "Not sending a deactivate message as master is disconnected"; } else { DeactivateFrameworkMessage message; message.mutable_framework_id()->MergeFrom(framework.id()); CHECK_SOME(master); send(master.get(), message); } Lock lock(mutex); pthread_cond_signal(cond); }
// NOTE: This function informs the master to stop attempting to send // messages to this scheduler. The abort flag stops any already // enqueued messages or messages in flight from being handled. We // don't want to terminate the process because one might do a // MesosSchedulerDriver::stop later, which dispatches to // SchedulerProcess::stop. void abort() { VLOG(1) << "Aborting the framework"; aborted = true; if (!connected) { VLOG(1) << "Not sending a deactivate message as master is disconnected"; return; } DeactivateFrameworkMessage message; message.mutable_framework_id()->MergeFrom(framework.id()); send(master, message); Lock lock(mutex); pthread_cond_signal(cond); }