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

Method allocations

src/v1/resources.cpp:1713–1728  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1711
1712
1713hashmap<string, Resources> Resources::allocations() const
1714{
1715 hashmap<string, Resources> result;
1716
1717 foreach (
1718 const Resource_Unsafe& resource_,
1719 resourcesNoMutationWithoutExclusiveOwnership) {
1720 // We require that this is called only when
1721 // the resources are allocated.
1722 CHECK(resource_->resource.has_allocation_info());
1723 CHECK(resource_->resource.allocation_info().has_role());
1724 result[resource_->resource.allocation_info().role()].add(resource_);
1725 }
1726
1727 return result;
1728}
1729
1730
1731Resources Resources::pushReservation(

Callers 4

TESTFunction · 0.45
updateAllocationMethod · 0.45
recoverResourcesMethod · 0.45

Calls

no outgoing calls

Tested by 2

TESTFunction · 0.36