Apache Mesos
Public Member Functions | List of all members
mesos::internal::master::allocator::HierarchicalAllocatorProcess< RoleSorter, FrameworkSorter, QuotaRoleSorter > Class Template Reference

#include <hierarchical.hpp>

Inheritance diagram for mesos::internal::master::allocator::HierarchicalAllocatorProcess< RoleSorter, FrameworkSorter, QuotaRoleSorter >:
mesos::internal::master::allocator::internal::HierarchicalAllocatorProcess mesos::internal::master::allocator::MesosAllocatorProcess process::Process< MesosAllocatorProcess > process::ProcessBase process::EventConsumer

Public Member Functions

 HierarchicalAllocatorProcess ()
 
- Public Member Functions inherited from mesos::internal::master::allocator::internal::HierarchicalAllocatorProcess
 HierarchicalAllocatorProcess (const std::function< Sorter *()> &roleSorterFactory, const std::function< Sorter *()> &_frameworkSorterFactory, const std::function< Sorter *()> &quotaRoleSorterFactory)
 
virtual ~HierarchicalAllocatorProcess ()
 
process::PID
< HierarchicalAllocatorProcess
self () const
 
void initialize (const Duration &allocationInterval, const lambda::function< void(const FrameworkID &, const hashmap< std::string, hashmap< SlaveID, Resources >> &)> &offerCallback, const lambda::function< void(const FrameworkID &, const hashmap< SlaveID, UnavailableResources > &)> &inverseOfferCallback, const Option< std::set< std::string >> &fairnessExcludeResourceNames=None(), bool filterGpuResources=true, const Option< DomainInfo > &domain=None())
 
void recover (const int _expectedAgentCount, const hashmap< std::string, Quota > &quotas)
 
void addFramework (const FrameworkID &frameworkId, const FrameworkInfo &frameworkInfo, const hashmap< SlaveID, Resources > &used, bool active, const std::set< std::string > &suppressedRoles)
 
void removeFramework (const FrameworkID &frameworkId)
 
void activateFramework (const FrameworkID &frameworkId)
 
void deactivateFramework (const FrameworkID &frameworkId)
 
void updateFramework (const FrameworkID &frameworkId, const FrameworkInfo &frameworkInfo, const std::set< std::string > &suppressedRoles)
 
void addSlave (const SlaveID &slaveId, const SlaveInfo &slaveInfo, const std::vector< SlaveInfo::Capability > &capabilities, const Option< Unavailability > &unavailability, const Resources &total, const hashmap< FrameworkID, Resources > &used)
 
void removeSlave (const SlaveID &slaveId)
 
void updateSlave (const SlaveID &slave, const SlaveInfo &slaveInfo, const Option< Resources > &total=None(), const Option< std::vector< SlaveInfo::Capability >> &capabilities=None())
 
void addResourceProvider (const SlaveID &slave, const Resources &total, const hashmap< FrameworkID, Resources > &used)
 
void deactivateSlave (const SlaveID &slaveId)
 
void activateSlave (const SlaveID &slaveId)
 
void updateWhitelist (const Option< hashset< std::string >> &whitelist)
 
void requestResources (const FrameworkID &frameworkId, const std::vector< Request > &requests)
 
void updateAllocation (const FrameworkID &frameworkId, const SlaveID &slaveId, const Resources &offeredResources, const std::vector< ResourceConversion > &conversions)
 
process::Future< NothingupdateAvailable (const SlaveID &slaveId, const std::vector< Offer::Operation > &operations)
 
void updateUnavailability (const SlaveID &slaveId, const Option< Unavailability > &unavailability)
 
void updateInverseOffer (const SlaveID &slaveId, const FrameworkID &frameworkId, const Option< UnavailableResources > &unavailableResources, const Option< mesos::allocator::InverseOfferStatus > &status, const Option< Filters > &filters)
 
process::Future< hashmap
< SlaveID, hashmap
< FrameworkID,
mesos::allocator::InverseOfferStatus > > > 
getInverseOfferStatuses ()
 
void recoverResources (const FrameworkID &frameworkId, const SlaveID &slaveId, const Resources &resources, const Option< Filters > &filters)
 
void suppressOffers (const FrameworkID &frameworkId, const std::set< std::string > &roles)
 
void reviveOffers (const FrameworkID &frameworkId, const std::set< std::string > &roles)
 
void setQuota (const std::string &role, const Quota &quota)
 
void removeQuota (const std::string &role)
 
void updateWeights (const std::vector< WeightInfo > &weightInfos)
 
- Public Member Functions inherited from mesos::internal::master::allocator::MesosAllocatorProcess
 MesosAllocatorProcess ()
 
virtual ~MesosAllocatorProcess ()
 
- Public Member Functions inherited from process::Process< MesosAllocatorProcess >
virtual ~Process ()
 
PID< MesosAllocatorProcess > self () const
 Returns the PID of the process. More...
 
- Public Member Functions inherited from process::ProcessBase
 ProcessBase (const std::string &id="")
 
virtual ~ProcessBase ()
 
const UPIDself () const
 
- Public Member Functions inherited from process::EventConsumer
virtual ~EventConsumer ()
 

Additional Inherited Members

- Protected Types inherited from mesos::internal::master::allocator::internal::HierarchicalAllocatorProcess
typedef
HierarchicalAllocatorProcess 
Self
 
typedef
HierarchicalAllocatorProcess 
This
 
- Protected Types inherited from process::Process< MesosAllocatorProcess >
typedef MesosAllocatorProcess Self
 
typedef MesosAllocatorProcess This
 
- Protected Types inherited from process::ProcessBase
enum  RemoteConnection { RemoteConnection::REUSE, RemoteConnection::RECONNECT }
 Describes the behavior of the link call when the target pid points to a remote process. More...
 
typedef lambda::function< void(const
UPID &, const std::string &)> 
MessageHandler
 Any function which takes a "from" UPID and a message body as arguments. More...
 
typedef lambda::function
< Future< http::Response >
const http::Request &)> 
HttpRequestHandler
 Any function which takes a process::http::Request and returns a process::http::Response. More...
 
typedef lambda::function
< Future< http::Response >
const http::Request &, const
Option
< http::authentication::Principal > &)> 
AuthenticatedHttpRequestHandler
 Any function which takes a process::http::Request and an Option<Principal> and returns a process::http::Response. More...
 
- Protected Member Functions inherited from mesos::internal::master::allocator::internal::HierarchicalAllocatorProcess
void pause ()
 
void resume ()
 
process::Future< Nothingallocate ()
 
process::Future< Nothingallocate (const SlaveID &slaveId)
 
process::Future< Nothingallocate (const hashset< SlaveID > &slaveIds)
 
Nothing _allocate ()
 
void __allocate ()
 
void deallocate ()
 
void expire (const FrameworkID &frameworkId, const std::string &role, const SlaveID &slaveId, OfferFilter *offerFilter)
 
void _expire (const FrameworkID &frameworkId, const std::string &role, const SlaveID &slaveId, OfferFilter *offerFilter)
 
void expire (const FrameworkID &frameworkId, const SlaveID &slaveId, InverseOfferFilter *inverseOfferFilter)
 
bool isWhitelisted (const SlaveID &slaveId) const
 
bool isFiltered (const FrameworkID &frameworkId, const std::string &role, const SlaveID &slaveId, const Resources &resources) const
 
bool isFiltered (const FrameworkID &frameworkID, const SlaveID &slaveID) const
 
double _event_queue_dispatches ()
 
double _resources_total (const std::string &resource)
 
double _resources_offered_or_allocated (const std::string &resource)
 
double _quota_allocated (const std::string &role, const std::string &resource)
 
double _offer_filters_active (const std::string &role)
 
- Protected Member Functions inherited from process::ProcessBase
virtual void serve (Event &&event)
 Invoked when an event is serviced. More...
 
void consume (MessageEvent &&event) override
 
void consume (DispatchEvent &&event) override
 
void consume (HttpEvent &&event) override
 
void consume (ExitedEvent &&event) override
 
void consume (TerminateEvent &&event) override
 
virtual void initialize ()
 Invoked when a process gets spawned. More...
 
virtual void finalize ()
 Invoked when a process is terminated. More...
 
virtual void exited (const UPID &)
 Invoked when a linked process has exited. More...
 
virtual void lost (const UPID &)
 Invoked when a linked process can no longer be monitored. More...
 
void send (const UPID &to, const std::string &name, const char *data=nullptr, size_t length=0)
 Sends the message to the specified UPID. More...
 
void send (const UPID &to, std::string &&name)
 
void send (const UPID &to, std::string &&name, std::string &&data)
 
UPID link (const UPID &pid, const RemoteConnection remote=RemoteConnection::REUSE)
 Links with the specified UPID. More...
 
void install (const std::string &name, const MessageHandler &handler)
 Sets up a handler for messages with the specified name. More...
 
template<typename T >
void install (const std::string &name, void(T::*method)(const UPID &, const std::string &))
 Sets up a handler for messages with the specified name. More...
 
void delegate (const std::string &name, const UPID &pid)
 Delegates incoming messages, with the specified name, to the UPID. More...
 
void route (const std::string &name, const Option< std::string > &help, const HttpRequestHandler &handler, const RouteOptions &options=RouteOptions())
 Sets up a handler for HTTP requests with the specified name. More...
 
template<typename T >
void route (const std::string &name, const Option< std::string > &help, Future< http::Response >(T::*method)(const http::Request &), const RouteOptions &options=RouteOptions())
 Sets up a handler for HTTP requests with the specified name. More...
 
void route (const std::string &name, const std::string &realm, const Option< std::string > &help, const AuthenticatedHttpRequestHandler &handler, const RouteOptions &options=RouteOptions())
 
template<typename T >
void route (const std::string &name, const std::string &realm, const Option< std::string > &help, Future< http::Response >(T::*method)(const http::Request &, const Option< http::authentication::Principal > &), const RouteOptions &options=RouteOptions())
 Sets up a handler for HTTP requests with the specified name. More...
 
void provide (const std::string &name, const std::string &path, const std::map< std::string, std::string > &types=mime::types)
 Sets up the default HTTP request handler to provide the static asset(s) at the specified absolute path for the specified name. More...
 
template<typename T >
size_t eventCount ()
 Returns the number of events of the given type currently on the event queue. More...
 
- Static Protected Member Functions inherited from mesos::internal::master::allocator::internal::HierarchicalAllocatorProcess
static bool allocatable (const Resources &resources)
 
- Protected Attributes inherited from mesos::internal::master::allocator::internal::HierarchicalAllocatorProcess
bool initialized
 
bool paused
 
Option< int > expectedAgentCount
 
Duration allocationInterval
 
lambda::function< void(const
FrameworkID &, const hashmap
< std::string, hashmap
< SlaveID, Resources >> &)> 
offerCallback
 
lambda::function< void(const
FrameworkID &, const hashmap
< SlaveID,
UnavailableResources > &)> 
inverseOfferCallback
 
friend Metrics
 
Metrics metrics
 
hashmap< FrameworkID, Frameworkframeworks
 
hashmap< SlaveID, Slaveslaves
 
hashset< SlaveID > allocationCandidates
 
Option< process::Future
< Nothing > > 
allocation
 
hashmap< std::string, hashset
< FrameworkID > > 
roles
 
hashmap< std::string, Quotaquotas
 
hashmap< std::string, ResourcesreservationScalarQuantities
 
Option< hashset< std::string > > whitelist
 
Option< std::set< std::string > > fairnessExcludeResourceNames
 
bool filterGpuResources
 
Option< DomainInfo > domain
 
process::Owned< SorterroleSorter
 
process::Owned< SorterquotaRoleSorter
 
hashmap< std::string,
process::Owned< Sorter > > 
frameworkSorters
 
const std::function< Sorter *()> frameworkSorterFactory
 

Constructor & Destructor Documentation

template<typename RoleSorter , typename FrameworkSorter , typename QuotaRoleSorter >
mesos::internal::master::allocator::HierarchicalAllocatorProcess< RoleSorter, FrameworkSorter, QuotaRoleSorter >::HierarchicalAllocatorProcess ( )
inline

The documentation for this class was generated from the following file: