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

Method validate

src/master/quota_handler.cpp:129–140  ·  view source on GitHub ↗

Check whether the tree satisfies: parent guarantees >= sum(children guarantees) TODO(mzhu): Add limit check.

Source from the content-addressed store, hash-verified

127 //
128 // TODO(mzhu): Add limit check.
129 Option<Error> validate() const
130 {
131 // Don't check the root node because it does not have quota set.
132 foreachvalue (const unique_ptr<Node>& child, root->children) {
133 Option<Error> error = child->validate();
134 if (error.isSome()) {
135 return error;
136 }
137 }
138
139 return None();
140 }
141
142 // Returns the total guaranteed resource quantities requested by
143 // all quotas in the tree. Since a role's guarantees must be greater

Callers 6

foreachvalueMethod · 0.45
foreachvalueMethod · 0.45
overcommitCheckMethod · 0.45
updateMethod · 0.45
_setMethod · 0.45
removeMethod · 0.45

Calls 1

NoneClass · 0.85

Tested by

no test coverage detected