13 #ifndef HERMES_DATA_PLACEMENT_ENGINE_H_
14 #define HERMES_DATA_PLACEMENT_ENGINE_H_
24 #define VERIFY_DPE_POLICY(ctx) \
25 if (ctx.policy != policy_) { \
42 explicit DPE(PlacementPolicy policy) :
policy_(policy) {}
43 virtual ~
DPE() =
default;
48 const std::vector<u64> &node_state,
49 const std::vector<TargetID> &targets,
51 std::vector<PlacementSchema> &output) = 0;
58 void GetSplitSizes(
size_t blob_size, std::vector<size_t> &output);
64 const std::vector<size_t> &blob_size,
65 std::vector<PlacementSchema> &output,
Definition: hermes_status.h:80
Definition: data_placement_engine.h:35
bool SplitBlob(size_t blob_size)
Definition: data_placement_engine.cc:50
DPE(PlacementPolicy policy)
Definition: data_placement_engine.h:42
std::vector< f32 > bandwidths
Definition: data_placement_engine.h:40
std::vector< int > GetValidSplitChoices(size_t blob_size)
Definition: data_placement_engine.cc:33
PlacementPolicy policy_
Definition: data_placement_engine.h:37
void GetSplitSizes(size_t blob_size, std::vector< size_t > &output)
Definition: data_placement_engine.cc:65
virtual 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)=0
PlacementPolicy
Definition: hermes_types.h:73
Definition: adapter_utils.cc:35
PlacementSchema AggregateBlobSchema(PlacementSchema &schema)
Definition: data_placement_engine.cc:84
std::vector< std::pair< size_t, TargetID > > PlacementSchema
Definition: hermes_types.h:226
Status CalculatePlacement(SharedMemoryContext *context, RpcContext *rpc, const std::vector< size_t > &blob_sizes, std::vector< PlacementSchema > &output, const api::Context &api_context)
Definition: data_placement_engine.cc:111
Definition: buffer_pool.h:273
Definition: hermes_types.h:137