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

Method update

src/examples/long_lived_executor.cpp:177–201  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

175 }
176
177 void update(const TaskInfo& task, const TaskState& state)
178 {
179 id::UUID uuid = id::UUID::random();
180
181 TaskStatus status;
182 status.mutable_task_id()->CopyFrom(task.task_id());
183 status.mutable_executor_id()->CopyFrom(executorId);
184 status.set_state(state);
185 status.set_source(TaskStatus::SOURCE_EXECUTOR);
186 status.set_timestamp(process::Clock::now().secs());
187 status.set_uuid(uuid.toBytes());
188
189 Call call;
190 call.mutable_framework_id()->CopyFrom(frameworkId);
191 call.mutable_executor_id()->CopyFrom(executorId);
192
193 call.set_type(Call::UPDATE);
194
195 call.mutable_update()->mutable_status()->CopyFrom(status);
196
197 // Capture the status update.
198 updates[uuid] = call.update();
199
200 mesos->send(call);
201 }
202
203 void launch(const TaskInfo& task)
204 {

Callers 6

sendMethod · 0.45
sendStatusUpdateMethod · 0.45
receivedMethod · 0.45
receivedMethod · 0.45
receivedMethod · 0.45
receivedMethod · 0.45

Calls 5

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

Tested by 3

sendStatusUpdateMethod · 0.36
receivedMethod · 0.36
receivedMethod · 0.36