Namespace faabric::scheduler
-
namespace scheduler
Typedefs
-
typedef std::pair<std::string, InMemoryMessageQueue*> InMemoryMessageQueuePair
Enums
-
enum FunctionCalls
Values:
-
enumerator NoFunctionCall
-
enumerator ExecuteFunctions
-
enumerator Flush
-
enumerator SetMessageResult
-
enumerator NoFunctionCall
Functions
-
std::vector<std::pair<std::string, faabric::Message>> getFunctionCalls()
-
std::vector<std::pair<std::string, faabric::EmptyRequest>> getFlushCalls()
-
std::vector<std::pair<std::string, std::shared_ptr<faabric::BatchExecuteRequest>>> getBatchRequests()
-
std::vector<std::pair<std::string, std::shared_ptr<faabric::Message>>> getMessageResults()
-
void clearMockRequests()
-
std::shared_ptr<FunctionCallClient> getFunctionCallClient(const std::string &otherHost)
-
void clearFunctionCallClients()
-
Scheduler &getScheduler()
-
std::string getChainedKey(unsigned int msgId)
Variables
-
static std::mutex mockMutex
-
static std::vector<std::pair<std::string, faabric::Message>> functionCalls
-
static std::vector<std::pair<std::string, faabric::EmptyRequest>> flushCalls
-
static std::vector<std::pair<std::string, std::shared_ptr<faabric::BatchExecuteRequest>>> batchMessages
-
static std::vector<std::pair<std::string, std::shared_ptr<faabric::Message>>> messageResults
-
static faabric::util::ConcurrentMap<std::string, std::shared_ptr<faabric::scheduler::FunctionCallClient>> functionCallClients
-
class FunctionCallClient : public faabric::transport::MessageEndpointClient
Public Functions
-
explicit FunctionCallClient(const std::string &hostIn)
-
void sendFlush()
-
explicit FunctionCallClient(const std::string &hostIn)
-
class FunctionCallServer : public faabric::transport::MessageEndpointServer
Public Functions
-
FunctionCallServer()
-
FunctionCallServer()
-
class Scheduler
Public Functions
-
Scheduler()
-
~Scheduler()
-
void reset()
-
void resetThreadLocalCache()
-
void shutdown()
-
inline bool isShutdown()
-
void broadcastSnapshotDelete(const faabric::Message &msg, const std::string &snapshotKey)
-
int reapStaleExecutors()
-
long getFunctionExecutorCount(const faabric::Message &msg)
-
void setThreadResultLocally(uint32_t appId, uint32_t msgId, int32_t returnValue, faabric::transport::Message &message)
Caches a message along with the thread result, to allow the thread result to refer to data held in that message (i.e. snapshot diffs). The message will be destroyed once the thread result is consumed.
-
size_t getCachedMessageCount()
-
std::string getThisHost()
-
void addHostToGlobalSet()
-
void removeHostFromGlobalSet(const std::string &host)
-
void setThisHostResources(faabric::HostResources &res)
-
std::vector<faabric::Message> getRecordedMessages()
-
void clearRecordedMessages()
-
Scheduler()
-
class SchedulerReaperThread : public faabric::util::PeriodicBackgroundThread
- #include <Scheduler.h>
Background thread that periodically checks to see if any executors have become stale (i.e. not handled any requests in a given timeout). If any are found, they are removed.
Public Functions
-
virtual void doWork() override
-
virtual void doWork() override
-
typedef std::pair<std::string, InMemoryMessageQueue*> InMemoryMessageQueuePair