Apache Mesos
Public Member Functions | Public Attributes | List of all members
mesos::internal::tests::TestAllocator< T > Class Template Reference

#include <allocator.hpp>

Inheritance diagram for mesos::internal::tests::TestAllocator< T >:
mesos::allocator::Allocator

Public Member Functions

 TestAllocator ()
 
virtual ~TestAllocator ()
 
 MOCK_METHOD6 (initialize, void(const Duration &, const lambda::function< void(const FrameworkID &, const hashmap< std::string, hashmap< SlaveID, Resources >> &)> &, const lambda::function< void(const FrameworkID &, const hashmap< SlaveID, UnavailableResources > &)> &, const Option< std::set< std::string >> &, bool, const Option< DomainInfo > &))
 
 MOCK_METHOD2 (recover, void(const int expectedAgentCount, const hashmap< std::string, Quota > &))
 
 MOCK_METHOD5 (addFramework, void(const FrameworkID &, const FrameworkInfo &, const hashmap< SlaveID, Resources > &, bool active, const std::set< std::string > &))
 
 MOCK_METHOD1 (removeFramework, void(const FrameworkID &))
 
 MOCK_METHOD1 (activateFramework, void(const FrameworkID &))
 
 MOCK_METHOD1 (deactivateFramework, void(const FrameworkID &))
 
 MOCK_METHOD3 (updateFramework, void(const FrameworkID &, const FrameworkInfo &, const std::set< std::string > &))
 
 MOCK_METHOD6 (addSlave, void(const SlaveID &, const SlaveInfo &, const std::vector< SlaveInfo::Capability > &, const Option< Unavailability > &, const Resources &, const hashmap< FrameworkID, Resources > &))
 
 MOCK_METHOD1 (removeSlave, void(const SlaveID &))
 
 MOCK_METHOD4 (updateSlave, void(const SlaveID &, const SlaveInfo &, const Option< Resources > &, const Option< std::vector< SlaveInfo::Capability >> &))
 
 MOCK_METHOD3 (addResourceProvider, void(const SlaveID &, const Resources &, const hashmap< FrameworkID, Resources > &))
 
 MOCK_METHOD1 (activateSlave, void(const SlaveID &))
 
 MOCK_METHOD1 (deactivateSlave, void(const SlaveID &))
 
 MOCK_METHOD1 (updateWhitelist, void(const Option< hashset< std::string >> &))
 
 MOCK_METHOD2 (requestResources, void(const FrameworkID &, const std::vector< Request > &))
 
 MOCK_METHOD4 (updateAllocation, void(const FrameworkID &, const SlaveID &, const Resources &, const std::vector< ResourceConversion > &))
 
 MOCK_METHOD2 (updateAvailable, process::Future< Nothing >(const SlaveID &, const std::vector< Offer::Operation > &))
 
 MOCK_METHOD2 (updateUnavailability, void(const SlaveID &, const Option< Unavailability > &))
 
 MOCK_METHOD5 (updateInverseOffer, void(const SlaveID &, const FrameworkID &, const Option< UnavailableResources > &, const Option< mesos::allocator::InverseOfferStatus > &, const Option< Filters > &))
 
 MOCK_METHOD0 (getInverseOfferStatuses, process::Future< hashmap< SlaveID, hashmap< FrameworkID, mesos::allocator::InverseOfferStatus >>>())
 
 MOCK_METHOD4 (recoverResources, void(const FrameworkID &, const SlaveID &, const Resources &, const Option< Filters > &filters))
 
 MOCK_METHOD2 (suppressOffers, void(const FrameworkID &, const std::set< std::string > &))
 
 MOCK_METHOD2 (reviveOffers, void(const FrameworkID &, const std::set< std::string > &))
 
 MOCK_METHOD2 (setQuota, void(const std::string &, const Quota &))
 
 MOCK_METHOD1 (removeQuota, void(const std::string &))
 
 MOCK_METHOD1 (updateWeights, void(const std::vector< WeightInfo > &))
 
- Public Member Functions inherited from mesos::allocator::Allocator
 Allocator ()
 
virtual ~Allocator ()
 
virtual 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())=0
 Initializes the allocator when the master starts up. More...
 
virtual void recover (const int expectedAgentCount, const hashmap< std::string, Quota > &quotas)=0
 Informs the allocator of the recovered state from the master. More...
 
virtual void addFramework (const FrameworkID &frameworkId, const FrameworkInfo &frameworkInfo, const hashmap< SlaveID, Resources > &used, bool active, const std::set< std::string > &suppressedRoles)=0
 Adds a framework to the Mesos cluster. More...
 
virtual void removeFramework (const FrameworkID &frameworkId)=0
 Removes a framework from the Mesos cluster. More...
 
virtual void activateFramework (const FrameworkID &frameworkId)=0
 Activates a framework in the Mesos cluster. More...
 
virtual void deactivateFramework (const FrameworkID &frameworkId)=0
 Deactivates a framework in the Mesos cluster. More...
 
virtual void updateFramework (const FrameworkID &frameworkId, const FrameworkInfo &frameworkInfo, const std::set< std::string > &suppressedRoles)=0
 Updates capabilities of a framework in the Mesos cluster. More...
 
virtual 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)=0
 Adds or re-adds an agent to the Mesos cluster. More...
 
virtual void removeSlave (const SlaveID &slaveId)=0
 Removes an agent from the Mesos cluster. More...
 
virtual void updateSlave (const SlaveID &slave, const SlaveInfo &slaveInfo, const Option< Resources > &total=None(), const Option< std::vector< SlaveInfo::Capability >> &capabilities=None())=0
 Updates an agent. More...
 
virtual void addResourceProvider (const SlaveID &slave, const Resources &total, const hashmap< FrameworkID, Resources > &used)=0
 Add resources from a local resource provider to an agent. More...
 
virtual void activateSlave (const SlaveID &slaveId)=0
 Activates an agent. More...
 
virtual void deactivateSlave (const SlaveID &slaveId)=0
 Deactivates an agent. More...
 
virtual void updateWhitelist (const Option< hashset< std::string >> &whitelist)=0
 Updates the list of trusted agents. More...
 
virtual void requestResources (const FrameworkID &frameworkId, const std::vector< Request > &requests)=0
 Requests resources for a framework. More...
 
virtual void updateAllocation (const FrameworkID &frameworkId, const SlaveID &slaveId, const Resources &offeredResources, const std::vector< ResourceConversion > &conversions)=0
 Updates allocation by applying offer operations. More...
 
virtual process::Future< NothingupdateAvailable (const SlaveID &slaveId, const std::vector< Offer::Operation > &operations)=0
 Updates available resources on an agent based on a sequence of offer operations. More...
 
virtual void updateUnavailability (const SlaveID &slaveId, const Option< Unavailability > &unavailability)=0
 Updates unavailability for an agent. More...
 
virtual void updateInverseOffer (const SlaveID &slaveId, const FrameworkID &frameworkId, const Option< UnavailableResources > &unavailableResources, const Option< InverseOfferStatus > &status, const Option< Filters > &filters=None())=0
 Updates inverse offer. More...
 
virtual process::Future< hashmap< SlaveID, hashmap< FrameworkID, mesos::allocator::InverseOfferStatus > > > getInverseOfferStatuses ()=0
 Retrieves the status of all inverse offers maintained by the allocator. More...
 
virtual void recoverResources (const FrameworkID &frameworkId, const SlaveID &slaveId, const Resources &resources, const Option< Filters > &filters)=0
 Recovers resources. More...
 
virtual void suppressOffers (const FrameworkID &frameworkId, const std::set< std::string > &roles)=0
 Suppresses offers. More...
 
virtual void reviveOffers (const FrameworkID &frameworkId, const std::set< std::string > &roles)=0
 Revives offers to this framework for the specified roles. More...
 
virtual void setQuota (const std::string &role, const Quota &quota)=0
 Informs the allocator to set quota for the given role. More...
 
virtual void removeQuota (const std::string &role)=0
 Informs the allocator to remove quota for the given role. More...
 
virtual void updateWeights (const std::vector< WeightInfo > &weightInfos)=0
 Updates the weight associated with one or more roles. More...
 

Public Attributes

process::Owned< mesos::allocator::Allocatorreal
 

Additional Inherited Members

- Static Public Member Functions inherited from mesos::allocator::Allocator
static Try< Allocator * > create (const std::string &name)
 Attempts either to create a built-in DRF allocator or to load an allocator instance from a module using the given name. More...
 

Constructor & Destructor Documentation

template<typename T = master::allocator::HierarchicalDRFAllocator>
mesos::internal::tests::TestAllocator< T >::TestAllocator ( )
inline
template<typename T = master::allocator::HierarchicalDRFAllocator>
virtual mesos::internal::tests::TestAllocator< T >::~TestAllocator ( )
inlinevirtual

Member Function Documentation

template<typename T = master::allocator::HierarchicalDRFAllocator>
mesos::internal::tests::TestAllocator< T >::MOCK_METHOD0 ( getInverseOfferStatuses  ,
process::Future< hashmap< SlaveID, hashmap< FrameworkID, mesos::allocator::InverseOfferStatus >>>  () 
)
template<typename T = master::allocator::HierarchicalDRFAllocator>
mesos::internal::tests::TestAllocator< T >::MOCK_METHOD1 ( removeFramework  ,
void(const FrameworkID &)   
)
template<typename T = master::allocator::HierarchicalDRFAllocator>
mesos::internal::tests::TestAllocator< T >::MOCK_METHOD1 ( activateFramework  ,
void(const FrameworkID &)   
)
template<typename T = master::allocator::HierarchicalDRFAllocator>
mesos::internal::tests::TestAllocator< T >::MOCK_METHOD1 ( deactivateFramework  ,
void(const FrameworkID &)   
)
template<typename T = master::allocator::HierarchicalDRFAllocator>
mesos::internal::tests::TestAllocator< T >::MOCK_METHOD1 ( removeSlave  ,
void(const SlaveID &)   
)
template<typename T = master::allocator::HierarchicalDRFAllocator>
mesos::internal::tests::TestAllocator< T >::MOCK_METHOD1 ( activateSlave  ,
void(const SlaveID &)   
)
template<typename T = master::allocator::HierarchicalDRFAllocator>
mesos::internal::tests::TestAllocator< T >::MOCK_METHOD1 ( deactivateSlave  ,
void(const SlaveID &)   
)
template<typename T = master::allocator::HierarchicalDRFAllocator>
mesos::internal::tests::TestAllocator< T >::MOCK_METHOD1 ( updateWhitelist  ,
void(const Option< hashset< std::string >> &)   
)
template<typename T = master::allocator::HierarchicalDRFAllocator>
mesos::internal::tests::TestAllocator< T >::MOCK_METHOD1 ( removeQuota  ,
void(const std::string &)   
)
template<typename T = master::allocator::HierarchicalDRFAllocator>
mesos::internal::tests::TestAllocator< T >::MOCK_METHOD1 ( updateWeights  ,
void(const std::vector< WeightInfo > &)   
)
template<typename T = master::allocator::HierarchicalDRFAllocator>
mesos::internal::tests::TestAllocator< T >::MOCK_METHOD2 ( recover  ,
void(const int expectedAgentCount, const hashmap< std::string, Quota > &)   
)
template<typename T = master::allocator::HierarchicalDRFAllocator>
mesos::internal::tests::TestAllocator< T >::MOCK_METHOD2 ( requestResources  ,
void(const FrameworkID &, const std::vector< Request > &)   
)
template<typename T = master::allocator::HierarchicalDRFAllocator>
mesos::internal::tests::TestAllocator< T >::MOCK_METHOD2 ( updateAvailable  ,
process::Future< Nothing const SlaveID &, const std::vector< Offer::Operation > & 
)
template<typename T = master::allocator::HierarchicalDRFAllocator>
mesos::internal::tests::TestAllocator< T >::MOCK_METHOD2 ( updateUnavailability  ,
void(const SlaveID &, const Option< Unavailability > &)   
)
template<typename T = master::allocator::HierarchicalDRFAllocator>
mesos::internal::tests::TestAllocator< T >::MOCK_METHOD2 ( suppressOffers  ,
void(const FrameworkID &, const std::set< std::string > &)   
)
template<typename T = master::allocator::HierarchicalDRFAllocator>
mesos::internal::tests::TestAllocator< T >::MOCK_METHOD2 ( reviveOffers  ,
void(const FrameworkID &, const std::set< std::string > &)   
)
template<typename T = master::allocator::HierarchicalDRFAllocator>
mesos::internal::tests::TestAllocator< T >::MOCK_METHOD2 ( setQuota  ,
void(const std::string &, const Quota &)   
)
template<typename T = master::allocator::HierarchicalDRFAllocator>
mesos::internal::tests::TestAllocator< T >::MOCK_METHOD3 ( updateFramework  ,
void(const FrameworkID &, const FrameworkInfo &, const std::set< std::string > &)   
)
template<typename T = master::allocator::HierarchicalDRFAllocator>
mesos::internal::tests::TestAllocator< T >::MOCK_METHOD3 ( addResourceProvider  ,
void(const SlaveID &, const Resources &, const hashmap< FrameworkID, Resources > &)   
)
template<typename T = master::allocator::HierarchicalDRFAllocator>
mesos::internal::tests::TestAllocator< T >::MOCK_METHOD4 ( updateSlave  ,
void(const SlaveID &, const SlaveInfo &, const Option< Resources > &, const Option< std::vector< SlaveInfo::Capability >> &)   
)
template<typename T = master::allocator::HierarchicalDRFAllocator>
mesos::internal::tests::TestAllocator< T >::MOCK_METHOD4 ( updateAllocation  ,
void(const FrameworkID &, const SlaveID &, const Resources &, const std::vector< ResourceConversion > &)   
)
template<typename T = master::allocator::HierarchicalDRFAllocator>
mesos::internal::tests::TestAllocator< T >::MOCK_METHOD4 ( recoverResources  ,
void(const FrameworkID &, const SlaveID &, const Resources &, const Option< Filters > &filters)   
)
template<typename T = master::allocator::HierarchicalDRFAllocator>
mesos::internal::tests::TestAllocator< T >::MOCK_METHOD5 ( addFramework  ,
void(const FrameworkID &, const FrameworkInfo &, const hashmap< SlaveID, Resources > &, bool active, const std::set< std::string > &)   
)
template<typename T = master::allocator::HierarchicalDRFAllocator>
mesos::internal::tests::TestAllocator< T >::MOCK_METHOD5 ( updateInverseOffer  ,
void(const SlaveID &, const FrameworkID &, const Option< UnavailableResources > &, const Option< mesos::allocator::InverseOfferStatus > &, const Option< Filters > &)   
)
template<typename T = master::allocator::HierarchicalDRFAllocator>
mesos::internal::tests::TestAllocator< T >::MOCK_METHOD6 ( initialize  ,
void(const Duration &, const lambda::function< void(const FrameworkID &, const hashmap< std::string, hashmap< SlaveID, Resources >> &)> &, const lambda::function< void(const FrameworkID &, const hashmap< SlaveID, UnavailableResources > &)> &, const Option< std::set< std::string >> &, bool, const Option< DomainInfo > &)   
)
template<typename T = master::allocator::HierarchicalDRFAllocator>
mesos::internal::tests::TestAllocator< T >::MOCK_METHOD6 ( addSlave  ,
void(const SlaveID &, const SlaveInfo &, const std::vector< SlaveInfo::Capability > &, const Option< Unavailability > &, const Resources &, const hashmap< FrameworkID, Resources > &)   
)

Member Data Documentation

template<typename T = master::allocator::HierarchicalDRFAllocator>
process::Owned<mesos::allocator::Allocator> mesos::internal::tests::TestAllocator< T >::real

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