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

Method totalGuarantees

src/master/quota_handler.cpp:146–156  ·  view source on GitHub ↗

Returns the total guaranteed resource quantities requested by all quotas in the tree. Since a role's guarantees must be greater than or equal to the sum of the guarantees of its children, we can just sum the guarantees of the top-level roles.

Source from the content-addressed store, hash-verified

144 // than or equal to the sum of the guarantees of its children, we can
145 // just sum the guarantees of the top-level roles.
146 ResourceQuantities totalGuarantees() const
147 {
148 ResourceQuantities result;
149
150 // Don't include the root node because it does not have quota set.
151 foreachvalue (const unique_ptr<Node>& child, root->children) {
152 result += child->quota.guarantees;
153 }
154
155 return result;
156 }
157
158private:
159 struct Node

Callers 2

overcommitCheckMethod · 0.80
updateMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected