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

Method reviveOffers

src/sched/sched.cpp:1445–1479  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1443 }
1444
1445 void reviveOffers(const vector<string>& roles)
1446 {
1447 if (roles.empty()) {
1448 suppressedRoles.clear();
1449 } else {
1450 for (const string& role : roles) {
1451 suppressedRoles.erase(role);
1452 }
1453 }
1454
1455 if (!connected) {
1456 VLOG(1) << "Ignoring REVIVE as master is disconnected;"
1457 << " the set of suppressed roles in the driver has been updated"
1458 << " and will be sent to the master during re-registration";
1459 sendUpdateFrameworkOnConnect = true;
1460 return;
1461 }
1462
1463 Call call;
1464
1465 CHECK(framework.has_id());
1466 call.mutable_framework_id()->CopyFrom(framework.id());
1467 call.set_type(Call::REVIVE);
1468
1469 if (roles.empty()) {
1470 VLOG(2) << "Sending REVIVE for all roles";
1471 } else {
1472 VLOG(2) << "Sending REVIVE for roles: " << stringify(roles);
1473 *call.mutable_revive()->mutable_roles() =
1474 RepeatedPtrField<string>(roles.begin(), roles.end());
1475 }
1476
1477 CHECK_SOME(master);
1478 send(master->pid(), call);
1479 }
1480
1481 void suppressOffers(const vector<string>& roles)
1482 {

Callers

nothing calls this directly

Calls 10

CopyFromMethod · 0.80
stringifyFunction · 0.50
sendFunction · 0.50
emptyMethod · 0.45
clearMethod · 0.45
eraseMethod · 0.45
idMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
pidMethod · 0.45

Tested by

no test coverage detected