MCPcopy Create free account
hub / github.com/apache/mesos / forward

Method forward

src/master/master.cpp:8204–8236  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8202
8203
8204void Master::forward(
8205 const StatusUpdate& update,
8206 const UPID& acknowledgee,
8207 Framework* framework)
8208{
8209 CHECK_NOTNULL(framework);
8210
8211 if (!acknowledgee) {
8212 LOG(INFO) << "Sending status update " << update
8213 << (update.status().has_message()
8214 ? " '" + update.status().message() + "'"
8215 : "");
8216 } else {
8217 LOG(INFO) << "Forwarding status update " << update;
8218 }
8219
8220 // The task might not exist in master's memory (e.g., failed task validation).
8221 Task* task = framework->getTask(update.status().task_id());
8222 if (task != nullptr) {
8223 // Set the status update state and uuid for the task. Note that
8224 // master-generated updates are terminal and do not have a uuid
8225 // (in which case the master also calls `removeTask()`).
8226 if (update.has_uuid()) {
8227 task->set_status_update_state(update.status().state());
8228 task->set_status_update_uuid(update.status().uuid());
8229 }
8230 }
8231
8232 StatusUpdateMessage message;
8233 message.mutable_update()->MergeFrom(update);
8234 message.set_pid(acknowledgee);
8235 framework->send(message);
8236}
8237
8238
8239void Master::updateOperationStatus(UpdateOperationStatusMessage&& update)

Callers

nothing calls this directly

Calls 6

MergeFromMethod · 0.80
sendMethod · 0.65
statusMethod · 0.45
messageMethod · 0.45
getTaskMethod · 0.45
stateMethod · 0.45

Tested by

no test coverage detected