File Planner.h

namespace faabric
namespace planner

Enums

enum FlushType

Values:

enumerator NoFlushType
enumerator Hosts
enumerator Executors
enumerator SchedulingState
class Planner

Public Functions

Planner()
PlannerConfig getConfig()
void printConfig() const
std::string getPolicy()
void setPolicy(const std::string &newPolicy)
bool reset()
bool flush(faabric::planner::FlushType flushType)
std::vector<std::shared_ptr<Host>> getAvailableHosts()
bool registerHost(const Host &hostIn, bool overwrite)
void removeHost(const Host &hostIn)
void setMessageResult(std::shared_ptr<faabric::Message> msg)
std::shared_ptr<faabric::Message> getMessageResult(std::shared_ptr<faabric::Message> msg)
void preloadSchedulingDecision(int appId, std::shared_ptr<batch_scheduler::SchedulingDecision> decision)
std::shared_ptr<batch_scheduler::SchedulingDecision> getPreloadedSchedulingDecision(int32_t appId, std::shared_ptr<BatchExecuteRequest> ber)
std::shared_ptr<faabric::BatchExecuteRequestStatus> getBatchResults(int32_t appId)
std::shared_ptr<faabric::batch_scheduler::SchedulingDecision> getSchedulingDecision(std::shared_ptr<BatchExecuteRequest> req)
faabric::batch_scheduler::InFlightReqs getInFlightReqs()
int getNumMigrations()
std::set<std::string> getNextEvictedHostIps()
std::map<int32_t, std::shared_ptr<BatchExecuteRequest>> getEvictedReqs()
std::shared_ptr<faabric::batch_scheduler::SchedulingDecision> callBatch(std::shared_ptr<BatchExecuteRequest> req)
void setNextEvictedVm(const std::set<std::string> &vmIp)

Private Functions

void flushHosts()
void flushExecutors()
void flushSchedulingState()
bool isHostExpired(std::shared_ptr<Host> host, long epochTimeMs = 0)
void dispatchSchedulingDecision(std::shared_ptr<faabric::BatchExecuteRequest> req, std::shared_ptr<faabric::batch_scheduler::SchedulingDecision> decision)

Private Members

std::shared_mutex plannerMx
PlannerState state
PlannerConfig config
faabric::snapshot::SnapshotRegistry &snapshotRegistry