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

Method sendStatusUpdate

src/examples/test_http_executor.cpp:106–129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104 }
105
106 void sendStatusUpdate(const TaskInfo& task, const TaskState& state)
107 {
108 id::UUID uuid = id::UUID::random();
109
110 TaskStatus status;
111 status.mutable_task_id()->CopyFrom(task.task_id());
112 status.mutable_executor_id()->CopyFrom(executorId);
113 status.set_state(state);
114 status.set_source(TaskStatus::SOURCE_EXECUTOR);
115 status.set_uuid(uuid.toBytes());
116
117 Call call;
118 call.mutable_framework_id()->CopyFrom(frameworkId);
119 call.mutable_executor_id()->CopyFrom(executorId);
120
121 call.set_type(Call::UPDATE);
122
123 call.mutable_update()->mutable_status()->CopyFrom(status);
124
125 // Capture the status update.
126 updates[uuid] = call.update();
127
128 mesos->send(call);
129 }
130
131 void received(queue<Event> events)
132 {

Callers

nothing calls this directly

Calls 5

randomFunction · 0.85
CopyFromMethod · 0.80
toBytesMethod · 0.80
sendMethod · 0.65
updateMethod · 0.45

Tested by

no test coverage detected