13 #ifndef HERMES_SRC_DPE_RANDOM_H_
14 #define HERMES_SRC_DPE_RANDOM_H_
16 #include "data_placement_engine.h"
24 Random() :
DPE(PlacementPolicy::kRandom) {}
27 const std::vector<u64> &node_state,
28 const std::vector<TargetID> &targets,
30 std::vector<PlacementSchema> &output);
37 const std::vector<TargetID> &targets,
38 std::multimap<u64, TargetID> &ordered_cap);
40 Status AddSchema(std::multimap<u64, TargetID> &ordered_cap,
size_t blob_size,
Definition: hermes_status.h:80
Definition: data_placement_engine.h:35
DPE(PlacementPolicy policy)
Definition: data_placement_engine.h:42
Status AddSchema(std::multimap< u64, TargetID > &ordered_cap, size_t blob_size, PlacementSchema &schema)
Definition: random.cc:21
void GetOrderedCapacities(const std::vector< u64 > &node_state, const std::vector< TargetID > &targets, std::multimap< u64, TargetID > &ordered_cap)
Definition: random.cc:47
Status Placement(const std::vector< size_t > &blob_sizes, const std::vector< u64 > &node_state, const std::vector< TargetID > &targets, const api::Context &ctx, std::vector< PlacementSchema > &output)
Definition: random.cc:55
Definition: adapter_utils.cc:35
std::vector< std::pair< size_t, TargetID > > PlacementSchema
Definition: hermes_types.h:226
Definition: hermes_types.h:137