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

Method createStrippedScalarQuantity

src/v1/resources.cpp:1789–1808  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1787
1788
1789Resources Resources::createStrippedScalarQuantity() const
1790{
1791 Resources stripped;
1792
1793 foreach (
1794 const Resource_Unsafe& resource_,
1795 resourcesNoMutationWithoutExclusiveOwnership) {
1796 if (resource_->resource.type() == Value::SCALAR) {
1797 Resource scalar;
1798
1799 scalar.set_name(resource_->resource.name());
1800 scalar.set_type(resource_->resource.type());
1801 scalar.mutable_scalar()->CopyFrom(resource_->resource.scalar());
1802
1803 stripped.add(std::move(scalar));
1804 }
1805 }
1806
1807 return stripped;
1808}
1809
1810
1811Option<Resources> Resources::find(const Resources& targets) const

Callers 3

TEST_FFunction · 0.45
TESTFunction · 0.45
updateAllocationMethod · 0.45

Calls

no outgoing calls

Tested by 2

TEST_FFunction · 0.36
TESTFunction · 0.36