| 196 | { |
| 197 | public: |
| 198 | SchedulerProcess(MesosSchedulerDriver* _driver, |
| 199 | Scheduler* _scheduler, |
| 200 | const FrameworkInfo& _framework, |
| 201 | const vector<string>& _suppressedRoles, |
| 202 | const Option<Credential>& _credential, |
| 203 | bool _implicitAcknowledgements, |
| 204 | const string& schedulerId, |
| 205 | MasterDetector* _detector, |
| 206 | const internal::scheduler::Flags& _flags, |
| 207 | std::recursive_mutex* _mutex, |
| 208 | Latch* _latch) |
| 209 | // We use a UUID here to ensure that the master can reliably |
| 210 | // distinguish between scheduler runs. Otherwise the master may |
| 211 | // receive a delayed ExitedEvent enqueued behind a |
| 212 | // re-registration, and deactivate the framework incorrectly. |
| 213 | // TODO(bmahler): Investigate better ways to solve this problem. |
| 214 | // Check if bidirectional links in Erlang provides better |
| 215 | // semantics: |
| 216 | // http://www.erlang.org/doc/reference_manual/processes.html#id84804. |
| 217 | // Consider using unique PIDs throughout libprocess and relying |
| 218 | // on name registration to identify the process without the PID. |
| 219 | : ProcessBase(schedulerId), |
| 220 | metrics(*this), |
| 221 | driver(_driver), |
| 222 | scheduler(_scheduler), |
| 223 | framework(_framework), |
| 224 | suppressedRoles(_suppressedRoles.begin(), _suppressedRoles.end()), |
| 225 | mutex(_mutex), |
| 226 | latch(_latch), |
| 227 | failover(_framework.has_id() && !framework.id().value().empty()), |
| 228 | connected(false), |
| 229 | sendUpdateFrameworkOnConnect(false), |
| 230 | running(true), |
| 231 | detector(_detector), |
| 232 | flags(_flags), |
| 233 | implicitAcknowledgements(_implicitAcknowledgements), |
| 234 | credential(_credential), |
| 235 | authenticatee(nullptr), |
| 236 | authenticating(None()), |
| 237 | authenticated(false), |
| 238 | reauthenticate(false), |
| 239 | failedAuthentications(0) |
| 240 | { |
| 241 | LOG(INFO) << "Version: " << MESOS_VERSION; |
| 242 | } |
| 243 | |
| 244 | ~SchedulerProcess() override |
| 245 | { |