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

Method updateFramework

src/sched/sched.cpp:1649–1680  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1647 }
1648
1649 void updateFramework(
1650 const FrameworkInfo& framework_,
1651 set<string>&& suppressedRoles_,
1652 OfferConstraints&& offerConstraints_)
1653 {
1654 if (!framework.has_id() || framework.id().value().empty()) {
1655 error("MesosSchedulerDriver::updateFramework() must not be called"
1656 " prior to registration with the master");
1657 return;
1658 }
1659
1660 if (framework_.id() != framework.id()) {
1661 error("The 'FrameworkInfo.id' provided to"
1662 " MesosSchedulerDriver::updateFramework()"
1663 " (" + stringify(framework_.id()) + ")"
1664 " must be equal to the value known to the MesosSchedulerDriver"
1665 " (" + stringify(framework.id()) + ")");
1666 return;
1667 }
1668
1669 framework = framework_;
1670 suppressedRoles = std::move(suppressedRoles_);
1671 offerConstraints = std::move(offerConstraints_);
1672
1673 if (connected) {
1674 sendUpdateFramework();
1675 } else {
1676 VLOG(1) << "Postponing UPDATE_FRAMEWORK call:"
1677 " not registered with master";
1678 sendUpdateFrameworkOnConnect = true;
1679 }
1680 }
1681
1682private:
1683 friend class mesos::MesosSchedulerDriver;

Callers

nothing calls this directly

Calls 5

errorFunction · 0.85
stringifyFunction · 0.50
emptyMethod · 0.45
valueMethod · 0.45
idMethod · 0.45

Tested by

no test coverage detected