Apache Mesos
Classes | Public Member Functions | Protected Attributes | List of all members
mesos::internal::storage::UriDiskProfileAdaptor Class Reference

#include <uri_disk_profile_adaptor.hpp>

Inheritance diagram for mesos::internal::storage::UriDiskProfileAdaptor:
mesos::DiskProfileAdaptor

Classes

struct  Flags
 

Public Member Functions

 UriDiskProfileAdaptor (const Flags &_flags)
 
 ~UriDiskProfileAdaptor () override
 
process::Future< DiskProfileAdaptor::ProfileInfotranslate (const std::string &profile, const ResourceProviderInfo &resourceProviderInfo) override
 Returns the CSI volume capability and the parameters to create CSI volumes associated with the profile. More...
 
process::Future< hashset< std::string > > watch (const hashset< std::string > &knownProfiles, const ResourceProviderInfo &resourceProviderInfo) override
 Returns a future that will be satisifed iff the set of profiles known by the module differs from the knownProfiles parameter. More...
 
- Public Member Functions inherited from mesos::DiskProfileAdaptor
virtual ~DiskProfileAdaptor ()
 

Protected Attributes

Flags flags
 
process::Owned< UriDiskProfileAdaptorProcessprocess
 

Additional Inherited Members

- Static Public Member Functions inherited from mesos::DiskProfileAdaptor
static Try< DiskProfileAdaptor * > create (const Option< std::string > &name=None())
 Factory method used to create a DiskProfileAdaptor instance. More...
 
static void setAdaptor (const std::shared_ptr< DiskProfileAdaptor > &adaptor)
 Global methods for setting and getting a DiskProfileAdaptor instance. More...
 
static std::shared_ptr< DiskProfileAdaptorgetAdaptor ()
 
- Protected Member Functions inherited from mesos::DiskProfileAdaptor
 DiskProfileAdaptor ()
 

Constructor & Destructor Documentation

mesos::internal::storage::UriDiskProfileAdaptor::UriDiskProfileAdaptor ( const Flags _flags)
mesos::internal::storage::UriDiskProfileAdaptor::~UriDiskProfileAdaptor ( )
override

Member Function Documentation

process::Future<DiskProfileAdaptor::ProfileInfo> mesos::internal::storage::UriDiskProfileAdaptor::translate ( const std::string &  profile,
const ResourceProviderInfo &  resourceProviderInfo 
)
overridevirtual

Returns the CSI volume capability and the parameters to create CSI volumes associated with the profile.

This method is expected to return a Failure if a matching profile cannot be found or retrieved. The caller should not proceed with any of the affected CSI requests if this method returns a failure.

The resourceProviderInfo parameter is the ResourceProviderInfo of the storage resource provider. This module may choose to filter results based on the type and name of the resource provider, or based on the type of the CSI plugin.

NOTE: This module assumes that profiles are immutable after creation. Changing the CSI volume capability or parameters of a profile after creation may result in undefined behavior from the storage resource provider.

Implements mesos::DiskProfileAdaptor.

process::Future<hashset<std::string> > mesos::internal::storage::UriDiskProfileAdaptor::watch ( const hashset< std::string > &  knownProfiles,
const ResourceProviderInfo &  resourceProviderInfo 
)
overridevirtual

Returns a future that will be satisifed iff the set of profiles known by the module differs from the knownProfiles parameter.

The resourceProviderInfo parameter is the ResourceProviderInfo of the storage resource provider. This module may choose to filter results based on the type and name of the resource provider, or based on the type of the CSI plugin.

NOTE: It is highly recommended for the module to insert a random delay between discovering a different set of profiles and satisfying this future, because the storage resource provider is expected to update the set of offered resources based on this future. Adding a random delay may prevent a thundering herd of resource updates to the Mesos master.

Implements mesos::DiskProfileAdaptor.

Member Data Documentation

Flags mesos::internal::storage::UriDiskProfileAdaptor::flags
protected
process::Owned<UriDiskProfileAdaptorProcess> mesos::internal::storage::UriDiskProfileAdaptor::process
protected

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