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

Function convertToHashmap

src/tests/mesos.hpp:1412–1422  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1410// Convert WeightInfos protobuf to weights hashmap.
1411template <typename TWeightInfo>
1412inline hashmap<std::string, double> convertToHashmap(
1413 const google::protobuf::RepeatedPtrField<TWeightInfo> weightInfos)
1414{
1415 hashmap<std::string, double> weights;
1416
1417 foreach (const TWeightInfo& weightInfo, weightInfos) {
1418 weights[weightInfo.role()] = weightInfo.weight();
1419 }
1420
1421 return weights;
1422}
1423
1424
1425// Helper to create DomainInfo.

Callers 1

checkWithGetRequestMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected