Apache Mesos
Classes | Public Member Functions | Protected Member Functions | Friends | List of all members
mesos::internal::master::Master Class Reference

#include <master.hpp>

Inheritance diagram for mesos::internal::master::Master:
ProtobufProcess< Master > process::Process< Master > process::ProcessBase process::EventConsumer

Public Member Functions

 Master (mesos::allocator::Allocator *allocator, Registrar *registrar, Files *files, mesos::master::contender::MasterContender *contender, mesos::master::detector::MasterDetector *detector, const Option< Authorizer * > &authorizer, const Option< std::shared_ptr< process::RateLimiter >> &slaveRemovalLimiter, const Flags &flags=Flags())
 
 ~Master () override
 
void submitScheduler (const std::string &name)
 
void registerFramework (const process::UPID &from, RegisterFrameworkMessage &&registerFrameworkMessage)
 
void reregisterFramework (const process::UPID &from, ReregisterFrameworkMessage &&reregisterFrameworkMessage)
 
void unregisterFramework (const process::UPID &from, const FrameworkID &frameworkId)
 
void deactivateFramework (const process::UPID &from, const FrameworkID &frameworkId)
 
void resourceRequest (const process::UPID &from, const FrameworkID &frameworkId, const std::vector< Request > &requests)
 
void launchTasks (const process::UPID &from, LaunchTasksMessage &&launchTasksMessage)
 
void reviveOffers (const process::UPID &from, const FrameworkID &frameworkId, const std::vector< std::string > &role)
 
void killTask (const process::UPID &from, const FrameworkID &frameworkId, const TaskID &taskId)
 
void statusUpdateAcknowledgement (const process::UPID &from, StatusUpdateAcknowledgementMessage &&statusUpdateAcknowledgementMessage)
 
void schedulerMessage (const process::UPID &from, FrameworkToExecutorMessage &&frameworkToExecutorMessage)
 
void executorMessage (const process::UPID &from, ExecutorToFrameworkMessage &&executorToFrameworkMessage)
 
void registerSlave (const process::UPID &from, RegisterSlaveMessage &&registerSlaveMessage)
 
void reregisterSlave (const process::UPID &from, ReregisterSlaveMessage &&incomingMessage)
 
void unregisterSlave (const process::UPID &from, const SlaveID &slaveId)
 
void statusUpdate (StatusUpdateMessage &&statusUpdateMessage)
 
void reconcileTasks (const process::UPID &from, ReconcileTasksMessage &&reconcileTasksMessage)
 
void updateOperationStatus (UpdateOperationStatusMessage &&update)
 
void exitedExecutor (const process::UPID &from, const SlaveID &slaveId, const FrameworkID &frameworkId, const ExecutorID &executorId, int32_t status)
 
void updateSlave (UpdateSlaveMessage &&message)
 
void updateUnavailability (const MachineID &machineId, const Option< Unavailability > &unavailability)
 
process::Future< bool > markUnreachable (const SlaveInfo &slave, bool duringMasterFailover, const std::string &message)
 
void markGone (Slave *slave, const TimeInfo &goneTime)
 
void authenticate (const process::UPID &from, const process::UPID &pid)
 
void frameworkFailoverTimeout (const FrameworkID &frameworkId, const process::Time &reregisteredTime)
 
void offer (const FrameworkID &frameworkId, const hashmap< std::string, hashmap< SlaveID, Resources >> &resources)
 
void inverseOffer (const FrameworkID &frameworkId, const hashmap< SlaveID, UnavailableResources > &resources)
 
void detected (const process::Future< Option< MasterInfo >> &_leader)
 
void lostCandidacy (const process::Future< Nothing > &lost)
 
process::Future< Nothing_recover (const Registry &registry)
 
MasterInfo info () const
 
- Public Member Functions inherited from ProtobufProcess< Master >
 ~ProtobufProcess () override
 
- Public Member Functions inherited from process::Process< Master >
 ~Process () override
 
PID< Master > self () const
 Returns the PID of the process. More...
 
- Public Member Functions inherited from process::ProcessBase
 ProcessBase (const std::string &id="")
 
 ~ProcessBase () override
 
const UPIDself () const
 
- Public Member Functions inherited from process::EventConsumer
virtual ~EventConsumer ()
 

Protected Member Functions

void initialize () override
 Invoked when a process gets spawned. More...
 
void finalize () override
 Invoked when a process is terminated. More...
 
void consume (process::MessageEvent &&event) override
 
void consume (process::ExitedEvent &&event) override
 
void exited (const process::UPID &pid) override
 Invoked when a linked process has exited. More...
 
void exited (const FrameworkID &frameworkId, const HttpConnection &http)
 
void _exited (Framework *framework)
 
void exited (const id::UUID &id)
 
void agentReregisterTimeout (const SlaveID &slaveId)
 
Nothing _agentReregisterTimeout (const SlaveID &slaveId)
 
void throttled (process::MessageEvent &&event, const Option< std::string > &principal)
 
void _consume (process::MessageEvent &&event)
 
void _consume (process::ExitedEvent &&event)
 
void exceededCapacity (const process::MessageEvent &event, const Option< std::string > &principal, uint64_t capacity)
 
process::Future< Nothingrecover ()
 
void recoveredSlavesTimeout (const Registry &registry)
 
void _registerSlave (const process::UPID &pid, RegisterSlaveMessage &&registerSlaveMessage, const Option< process::http::authentication::Principal > &principal, const process::Future< bool > &authorized)
 
void __registerSlave (const process::UPID &pid, RegisterSlaveMessage &&registerSlaveMessage, const process::Future< bool > &admit)
 
void _reregisterSlave (const process::UPID &pid, ReregisterSlaveMessage &&incomingMessage, const Option< process::http::authentication::Principal > &principal, const process::Future< bool > &authorized)
 
void __reregisterSlave (const process::UPID &pid, ReregisterSlaveMessage &&incomingMessage, const process::Future< bool > &readmit)
 
void ___reregisterSlave (const process::UPID &pid, ReregisterSlaveMessage &&incomingMessage, const process::Future< bool > &updated)
 
void updateSlaveFrameworks (Slave *slave, const std::vector< FrameworkInfo > &frameworks)
 
void _authenticate (const process::UPID &pid, const process::Future< Option< std::string >> &future)
 
void authenticationTimeout (process::Future< Option< std::string >> future)
 
void fileAttached (const process::Future< Nothing > &result, const std::string &path)
 
void contended (const process::Future< process::Future< Nothing >> &candidacy)
 
void reconcileKnownSlave (Slave *slave, const std::vector< ExecutorInfo > &executors, const std::vector< Task > &tasks)
 
void addFramework (Framework *framework, const std::set< std::string > &suppressedRoles)
 
void recoverFramework (const FrameworkInfo &info, const std::set< std::string > &suppressedRoles)
 
Try< NothingactivateRecoveredFramework (Framework *framework, const FrameworkInfo &frameworkInfo, const Option< process::UPID > &pid, const Option< HttpConnection > &http, const std::set< std::string > &suppressedRoles)
 
void failoverFramework (Framework *framework, const process::UPID &newPid)
 
void failoverFramework (Framework *framework, const HttpConnection &http)
 
void _failoverFramework (Framework *framework)
 
void removeFramework (Framework *framework)
 
void removeFramework (Slave *slave, Framework *framework)
 
void updateFramework (Framework *framework, const FrameworkInfo &frameworkInfo, const std::set< std::string > &suppressedRoles)
 
void disconnect (Framework *framework)
 
void deactivate (Framework *framework, bool rescind)
 
void disconnect (Slave *slave)
 
void deactivate (Slave *slave)
 
void addSlave (Slave *slave, std::vector< Archive::Framework > &&completedFrameworks)
 
void _markUnreachable (const SlaveInfo &slave, const TimeInfo &unreachableTime, bool duringMasterFailover, const std::string &message, bool registrarResult)
 
void sendSlaveLost (const SlaveInfo &slaveInfo)
 
void removeSlave (Slave *slave, const std::string &message, Option< process::metrics::Counter > reason=None())
 
void _removeSlave (Slave *slave, const process::Future< bool > &registrarResult, const std::string &removalCause, Option< process::metrics::Counter > reason=None())
 
void __removeSlave (Slave *slave, const std::string &message, const Option< TimeInfo > &unreachableTime)
 
Option< ErrorvalidateFrameworkAuthentication (const FrameworkInfo &frameworkInfo, const process::UPID &from)
 
process::Future< bool > authorizeFramework (const FrameworkInfo &frameworkInfo)
 
process::Future< bool > authorizeSlave (const SlaveInfo &slaveInfo, const Option< process::http::authentication::Principal > &principal)
 
process::Future< bool > authorizeTask (const TaskInfo &task, Framework *framework)
 
process::Future< bool > authorizeReserveResources (const Offer::Operation::Reserve &reserve, const Option< process::http::authentication::Principal > &principal)
 Authorizes a RESERVE operation. More...
 
process::Future< bool > authorizeReserveResources (const Resources &resources, const Option< process::http::authentication::Principal > &principal)
 
process::Future< bool > authorizeUnreserveResources (const Offer::Operation::Unreserve &unreserve, const Option< process::http::authentication::Principal > &principal)
 Authorizes an UNRESERVE operation. More...
 
process::Future< bool > authorizeCreateVolume (const Offer::Operation::Create &create, const Option< process::http::authentication::Principal > &principal)
 Authorizes a CREATE operation. More...
 
process::Future< bool > authorizeDestroyVolume (const Offer::Operation::Destroy &destroy, const Option< process::http::authentication::Principal > &principal)
 Authorizes a DESTROY operation. More...
 
process::Future< bool > authorizeResizeVolume (const Resource &volume, const Option< process::http::authentication::Principal > &principal)
 Authorizes resize of a volume triggered by either GROW_VOLUME or SHRINK_VOLUME operations. More...
 
process::Future< bool > authorizeCreateDisk (const Offer::Operation::CreateDisk &createDisk, const Option< process::http::authentication::Principal > &principal)
 Authorizes a CREATE_DISK operation. More...
 
process::Future< bool > authorizeDestroyDisk (const Offer::Operation::DestroyDisk &destroyDisk, const Option< process::http::authentication::Principal > &principal)
 Authorizes a DESTROY_DISK operation. More...
 
bool isLaunchExecutor (const ExecutorID &executorId, Framework *framework, Slave *slave) const
 
void addExecutor (const ExecutorInfo &executorInfo, Framework *framework, Slave *slave)
 
void addTask (const TaskInfo &task, Framework *framework, Slave *slave)
 
void updateTask (Task *task, const StatusUpdate &update)
 
void removeTask (Task *task, bool unreachable=false)
 
void removeExecutor (Slave *slave, const FrameworkID &frameworkId, const ExecutorID &executorId)
 
void addOperation (Framework *framework, Slave *slave, Operation *operation)
 
void updateOperation (Operation *operation, const UpdateOperationStatusMessage &update, bool convertResources=true)
 
void removeOperation (Operation *operation)
 
process::Future< Nothingapply (Slave *slave, const Offer::Operation &operation)
 
void forward (const StatusUpdate &update, const process::UPID &acknowledgee, Framework *framework)
 
void offerTimeout (const OfferID &offerId)
 
void removeOffer (Offer *offer, bool rescind=false)
 
void inverseOfferTimeout (const OfferID &inverseOfferId)
 
void removeInverseOffer (InverseOffer *inverseOffer, bool rescind=false)
 
bool isCompletedFramework (const FrameworkID &frameworkId)
 
FrameworkgetFramework (const FrameworkID &frameworkId) const
 
Offer * getOffer (const OfferID &offerId) const
 
InverseOffer * getInverseOffer (const OfferID &inverseOfferId) const
 
FrameworkID newFrameworkId ()
 
OfferID newOfferId ()
 
SlaveID newSlaveId ()
 
- Protected Member Functions inherited from ProtobufProcess< Master >
void consume (process::MessageEvent &&event) override
 
void send (const process::UPID &to, const google::protobuf::Message &message)
 
void reply (const google::protobuf::Message &message)
 
void install (void(Master::*method)(const process::UPID &, const M &))
 
void install (void(Master::*method)(const process::UPID &, M &&))
 
void install (void(Master::*method)(const process::UPID &))
 
void install (void(Master::*method)(const process::UPID &, PC...), MessageProperty< M, P >...param)
 
void install (void(Master::*method)(const M &))
 
void install (void(Master::*method)(M &&))
 
void install (void(Master::*method)())
 
void install (void(Master::*method)(PC...), MessageProperty< M, P >...param)
 
- Protected Member Functions inherited from process::ProcessBase
virtual void serve (Event &&event)
 Invoked when an event is serviced. More...
 
void consume (DispatchEvent &&event) override
 
void consume (HttpEvent &&event) override
 
void consume (ExitedEvent &&event) override
 
void consume (TerminateEvent &&event) override
 
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 Option< 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())
 Forwards to the correct overload of process::ProcessBase::route(), depending on whether the authentication realm realm is present. 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...
 

Friends

struct Framework
 
struct FrameworkMetrics
 
struct Metrics
 
struct Slave
 
struct SlavesWriter
 
struct Subscriber
 
Offer * validation::offer::getOffer (Master *master, const OfferID &offerId)
 
InverseOffer * validation::offer::getInverseOffer (Master *master, const OfferID &offerId)
 
Slavevalidation::offer::getSlave (Master *master, const SlaveID &slaveId)
 

Additional Inherited Members

- Protected Types inherited from ProtobufProcess< Master >
using MessageProperty = P(M::*)() const
 
- Protected Types inherited from process::Process< Master >
typedef Master Self
 
typedef Master 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...
 

Constructor & Destructor Documentation

mesos::internal::master::Master::Master ( mesos::allocator::Allocator allocator,
Registrar registrar,
Files files,
mesos::master::contender::MasterContender contender,
mesos::master::detector::MasterDetector detector,
const Option< Authorizer * > &  authorizer,
const Option< std::shared_ptr< process::RateLimiter >> &  slaveRemovalLimiter,
const Flags flags = Flags() 
)
mesos::internal::master::Master::~Master ( )
override

Member Function Documentation

void mesos::internal::master::Master::___reregisterSlave ( const process::UPID pid,
ReregisterSlaveMessage &&  incomingMessage,
const process::Future< bool > &  updated 
)
protected
void mesos::internal::master::Master::__registerSlave ( const process::UPID pid,
RegisterSlaveMessage &&  registerSlaveMessage,
const process::Future< bool > &  admit 
)
protected
void mesos::internal::master::Master::__removeSlave ( Slave slave,
const std::string &  message,
const Option< TimeInfo > &  unreachableTime 
)
protected
void mesos::internal::master::Master::__reregisterSlave ( const process::UPID pid,
ReregisterSlaveMessage &&  incomingMessage,
const process::Future< bool > &  readmit 
)
protected
Nothing mesos::internal::master::Master::_agentReregisterTimeout ( const SlaveID &  slaveId)
protected
void mesos::internal::master::Master::_authenticate ( const process::UPID pid,
const process::Future< Option< std::string >> &  future 
)
protected
void mesos::internal::master::Master::_consume ( process::MessageEvent &&  event)
protected
void mesos::internal::master::Master::_consume ( process::ExitedEvent &&  event)
protected
void mesos::internal::master::Master::_exited ( Framework framework)
protected
void mesos::internal::master::Master::_failoverFramework ( Framework framework)
protected
void mesos::internal::master::Master::_markUnreachable ( const SlaveInfo &  slave,
const TimeInfo &  unreachableTime,
bool  duringMasterFailover,
const std::string &  message,
bool  registrarResult 
)
protected
process::Future<Nothing> mesos::internal::master::Master::_recover ( const Registry &  registry)
void mesos::internal::master::Master::_registerSlave ( const process::UPID pid,
RegisterSlaveMessage &&  registerSlaveMessage,
const Option< process::http::authentication::Principal > &  principal,
const process::Future< bool > &  authorized 
)
protected
void mesos::internal::master::Master::_removeSlave ( Slave slave,
const process::Future< bool > &  registrarResult,
const std::string &  removalCause,
Option< process::metrics::Counter reason = None() 
)
protected
void mesos::internal::master::Master::_reregisterSlave ( const process::UPID pid,
ReregisterSlaveMessage &&  incomingMessage,
const Option< process::http::authentication::Principal > &  principal,
const process::Future< bool > &  authorized 
)
protected
Try<Nothing> mesos::internal::master::Master::activateRecoveredFramework ( Framework framework,
const FrameworkInfo &  frameworkInfo,
const Option< process::UPID > &  pid,
const Option< HttpConnection > &  http,
const std::set< std::string > &  suppressedRoles 
)
protected
void mesos::internal::master::Master::addExecutor ( const ExecutorInfo &  executorInfo,
Framework framework,
Slave slave 
)
protected
void mesos::internal::master::Master::addFramework ( Framework framework,
const std::set< std::string > &  suppressedRoles 
)
protected
void mesos::internal::master::Master::addOperation ( Framework framework,
Slave slave,
Operation *  operation 
)
protected
void mesos::internal::master::Master::addSlave ( Slave slave,
std::vector< Archive::Framework > &&  completedFrameworks 
)
protected
void mesos::internal::master::Master::addTask ( const TaskInfo &  task,
Framework framework,
Slave slave 
)
protected
void mesos::internal::master::Master::agentReregisterTimeout ( const SlaveID &  slaveId)
protected
process::Future<Nothing> mesos::internal::master::Master::apply ( Slave slave,
const Offer::Operation &  operation 
)
protected
void mesos::internal::master::Master::authenticate ( const process::UPID from,
const process::UPID pid 
)
void mesos::internal::master::Master::authenticationTimeout ( process::Future< Option< std::string >>  future)
protected
process::Future<bool> mesos::internal::master::Master::authorizeCreateDisk ( const Offer::Operation::CreateDisk &  createDisk,
const Option< process::http::authentication::Principal > &  principal 
)
protected

Authorizes a CREATE_DISK operation.

Returns whether the CREATE_DISK operation is authorized with the provided principal. This function is used for authorization of operations originating from frameworks. Note that operations may be validated AFTER authorization, so it's possible that the operation could be malformed.

Parameters
createDiskThe CREATE_DISK operation to be performed.
principalAn Option containing the principal attempting this operation.
Returns
A Future containing a boolean value representing the success or failure of this authorization. A failed Future implies that validation of the operation did not succeed.
process::Future<bool> mesos::internal::master::Master::authorizeCreateVolume ( const Offer::Operation::Create &  create,
const Option< process::http::authentication::Principal > &  principal 
)
protected

Authorizes a CREATE operation.

Returns whether the Create operation is authorized with the provided principal. This function is used for authorization of operations originating both from frameworks and operators. Note that operations may be validated AFTER authorization, so it's possible that create could be malformed.

Parameters
createThe CREATE operation to be performed.
principalAn Option containing the principal attempting this operation.
Returns
A Future containing a boolean value representing the success or failure of this authorization. A failed Future implies that validation of the operation did not succeed.
process::Future<bool> mesos::internal::master::Master::authorizeDestroyDisk ( const Offer::Operation::DestroyDisk &  destroyDisk,
const Option< process::http::authentication::Principal > &  principal 
)
protected

Authorizes a DESTROY_DISK operation.

Returns whether the DESTROY_DISK operation is authorized with the provided principal. This function is used for authorization of operations originating from frameworks. Note that operations may be validated AFTER authorization, so it's possible that the operation could be malformed.

Parameters
destroyDiskThe DESTROY_DISK operation to be performed.
principalAn Option containing the principal attempting this operation.
Returns
A Future containing a boolean value representing the success or failure of this authorization. A failed Future implies that validation of the operation did not succeed.
process::Future<bool> mesos::internal::master::Master::authorizeDestroyVolume ( const Offer::Operation::Destroy &  destroy,
const Option< process::http::authentication::Principal > &  principal 
)
protected

Authorizes a DESTROY operation.

Returns whether the Destroy operation is authorized with the provided principal. This function is used for authorization of operations originating both from frameworks and operators. Note that operations may be validated AFTER authorization, so it's possible that destroy could be malformed.

Parameters
destroyThe DESTROY operation to be performed.
principalAn Option containing the principal attempting this operation.
Returns
A Future containing a boolean value representing the success or failure of this authorization. A failed Future implies that validation of the operation did not succeed.
process::Future<bool> mesos::internal::master::Master::authorizeFramework ( const FrameworkInfo &  frameworkInfo)
protected
process::Future<bool> mesos::internal::master::Master::authorizeReserveResources ( const Offer::Operation::Reserve &  reserve,
const Option< process::http::authentication::Principal > &  principal 
)
protected

Authorizes a RESERVE operation.

Returns whether the Reserve operation is authorized with the provided principal. This function is used for authorization of operations originating from both frameworks and operators. Note that operations may be validated AFTER authorization, so it's possible that reserve could be malformed.

Parameters
reserveThe RESERVE operation to be performed.
principalAn Option containing the principal attempting this operation.
Returns
A Future containing a boolean value representing the success or failure of this authorization. A failed Future implies that validation of the operation did not succeed.
process::Future<bool> mesos::internal::master::Master::authorizeReserveResources ( const Resources resources,
const Option< process::http::authentication::Principal > &  principal 
)
protected
process::Future<bool> mesos::internal::master::Master::authorizeResizeVolume ( const Resource &  volume,
const Option< process::http::authentication::Principal > &  principal 
)
protected

Authorizes resize of a volume triggered by either GROW_VOLUME or SHRINK_VOLUME operations.

Returns whether the triggering operation is authorized with the provided principal. This function is used for authorization of operations originating both from frameworks and operators. Note that operations may be validated AFTER authorization, so it's possible that the operation could be malformed.

Parameters
volumeThe volume being resized.
principalAn Option containing the principal attempting this operation.
Returns
A Future containing a boolean value representing the success or failure of this authorization. A failed Future implies that validation of the operation did not succeed.
process::Future<bool> mesos::internal::master::Master::authorizeSlave ( const SlaveInfo &  slaveInfo,
const Option< process::http::authentication::Principal > &  principal 
)
protected
process::Future<bool> mesos::internal::master::Master::authorizeTask ( const TaskInfo &  task,
Framework framework 
)
protected
process::Future<bool> mesos::internal::master::Master::authorizeUnreserveResources ( const Offer::Operation::Unreserve &  unreserve,
const Option< process::http::authentication::Principal > &  principal 
)
protected

Authorizes an UNRESERVE operation.

Returns whether the Unreserve operation is authorized with the provided principal. This function is used for authorization of operations originating both from frameworks and operators. Note that operations may be validated AFTER authorization, so it's possible that unreserve could be malformed.

Parameters
unreserveThe UNRESERVE operation to be performed.
principalAn Option containing the principal attempting this operation.
Returns
A Future containing a boolean value representing the success or failure of this authorization. A failed Future implies that validation of the operation did not succeed.
void mesos::internal::master::Master::consume ( process::MessageEvent &&  event)
overrideprotectedvirtual

Reimplemented from process::EventConsumer.

void mesos::internal::master::Master::consume ( process::ExitedEvent &&  event)
overrideprotectedvirtual

Reimplemented from process::EventConsumer.

void mesos::internal::master::Master::contended ( const process::Future< process::Future< Nothing >> &  candidacy)
protected
void mesos::internal::master::Master::deactivate ( Framework framework,
bool  rescind 
)
protected
void mesos::internal::master::Master::deactivate ( Slave slave)
protected
void mesos::internal::master::Master::deactivateFramework ( const process::UPID from,
const FrameworkID &  frameworkId 
)
void mesos::internal::master::Master::detected ( const process::Future< Option< MasterInfo >> &  _leader)
void mesos::internal::master::Master::disconnect ( Framework framework)
protected
void mesos::internal::master::Master::disconnect ( Slave slave)
protected
void mesos::internal::master::Master::exceededCapacity ( const process::MessageEvent event,
const Option< std::string > &  principal,
uint64_t  capacity 
)
protected
void mesos::internal::master::Master::executorMessage ( const process::UPID from,
ExecutorToFrameworkMessage &&  executorToFrameworkMessage 
)
void mesos::internal::master::Master::exited ( const process::UPID )
overrideprotectedvirtual

Invoked when a linked process has exited.

For local linked processes (i.e., when the linker and linkee are part of the same OS process), this can be used to reliably detect when the linked process has exited.

For remote linked processes, this indicates that the persistent TCP connection between the linker and the linkee has failed (e.g., linkee process died, a network error occurred). In this situation, the remote linkee process might still be running.

See also
process::ProcessBase::link

Reimplemented from process::ProcessBase.

void mesos::internal::master::Master::exited ( const FrameworkID &  frameworkId,
const HttpConnection http 
)
protected
void mesos::internal::master::Master::exited ( const id::UUID id)
protected
void mesos::internal::master::Master::exitedExecutor ( const process::UPID from,
const SlaveID &  slaveId,
const FrameworkID &  frameworkId,
const ExecutorID &  executorId,
int32_t  status 
)
void mesos::internal::master::Master::failoverFramework ( Framework framework,
const process::UPID newPid 
)
protected
void mesos::internal::master::Master::failoverFramework ( Framework framework,
const HttpConnection http 
)
protected
void mesos::internal::master::Master::fileAttached ( const process::Future< Nothing > &  result,
const std::string &  path 
)
protected
void mesos::internal::master::Master::finalize ( )
overrideprotectedvirtual

Invoked when a process is terminated.

NOTE: this does not get invoked automatically if process::ProcessBase::consume(TerminateEvent&&) is overridden.

Reimplemented from process::ProcessBase.

void mesos::internal::master::Master::forward ( const StatusUpdate &  update,
const process::UPID acknowledgee,
Framework framework 
)
protected
void mesos::internal::master::Master::frameworkFailoverTimeout ( const FrameworkID &  frameworkId,
const process::Time reregisteredTime 
)
Framework* mesos::internal::master::Master::getFramework ( const FrameworkID &  frameworkId) const
protected
InverseOffer* mesos::internal::master::Master::getInverseOffer ( const OfferID &  inverseOfferId) const
protected
Offer* mesos::internal::master::Master::getOffer ( const OfferID &  offerId) const
protected
MasterInfo mesos::internal::master::Master::info ( ) const
inline
void mesos::internal::master::Master::initialize ( )
overrideprotectedvirtual

Invoked when a process gets spawned.

Reimplemented from process::ProcessBase.

void mesos::internal::master::Master::inverseOffer ( const FrameworkID &  frameworkId,
const hashmap< SlaveID, UnavailableResources > &  resources 
)
void mesos::internal::master::Master::inverseOfferTimeout ( const OfferID &  inverseOfferId)
protected
bool mesos::internal::master::Master::isCompletedFramework ( const FrameworkID &  frameworkId)
protected
bool mesos::internal::master::Master::isLaunchExecutor ( const ExecutorID &  executorId,
Framework framework,
Slave slave 
) const
protected
void mesos::internal::master::Master::killTask ( const process::UPID from,
const FrameworkID &  frameworkId,
const TaskID &  taskId 
)
void mesos::internal::master::Master::launchTasks ( const process::UPID from,
LaunchTasksMessage &&  launchTasksMessage 
)
void mesos::internal::master::Master::lostCandidacy ( const process::Future< Nothing > &  lost)
void mesos::internal::master::Master::markGone ( Slave slave,
const TimeInfo &  goneTime 
)
process::Future<bool> mesos::internal::master::Master::markUnreachable ( const SlaveInfo &  slave,
bool  duringMasterFailover,
const std::string &  message 
)
FrameworkID mesos::internal::master::Master::newFrameworkId ( )
protected
OfferID mesos::internal::master::Master::newOfferId ( )
protected
SlaveID mesos::internal::master::Master::newSlaveId ( )
protected
void mesos::internal::master::Master::offer ( const FrameworkID &  frameworkId,
const hashmap< std::string, hashmap< SlaveID, Resources >> &  resources 
)
void mesos::internal::master::Master::offerTimeout ( const OfferID &  offerId)
protected
void mesos::internal::master::Master::reconcileKnownSlave ( Slave slave,
const std::vector< ExecutorInfo > &  executors,
const std::vector< Task > &  tasks 
)
protected
void mesos::internal::master::Master::reconcileTasks ( const process::UPID from,
ReconcileTasksMessage &&  reconcileTasksMessage 
)
process::Future<Nothing> mesos::internal::master::Master::recover ( )
protected
void mesos::internal::master::Master::recoveredSlavesTimeout ( const Registry &  registry)
protected
void mesos::internal::master::Master::recoverFramework ( const FrameworkInfo &  info,
const std::set< std::string > &  suppressedRoles 
)
protected
void mesos::internal::master::Master::registerFramework ( const process::UPID from,
RegisterFrameworkMessage &&  registerFrameworkMessage 
)
void mesos::internal::master::Master::registerSlave ( const process::UPID from,
RegisterSlaveMessage &&  registerSlaveMessage 
)
void mesos::internal::master::Master::removeExecutor ( Slave slave,
const FrameworkID &  frameworkId,
const ExecutorID &  executorId 
)
protected
void mesos::internal::master::Master::removeFramework ( Framework framework)
protected
void mesos::internal::master::Master::removeFramework ( Slave slave,
Framework framework 
)
protected
void mesos::internal::master::Master::removeInverseOffer ( InverseOffer *  inverseOffer,
bool  rescind = false 
)
protected
void mesos::internal::master::Master::removeOffer ( Offer *  offer,
bool  rescind = false 
)
protected
void mesos::internal::master::Master::removeOperation ( Operation *  operation)
protected
void mesos::internal::master::Master::removeSlave ( Slave slave,
const std::string &  message,
Option< process::metrics::Counter reason = None() 
)
protected
void mesos::internal::master::Master::removeTask ( Task *  task,
bool  unreachable = false 
)
protected
void mesos::internal::master::Master::reregisterFramework ( const process::UPID from,
ReregisterFrameworkMessage &&  reregisterFrameworkMessage 
)
void mesos::internal::master::Master::reregisterSlave ( const process::UPID from,
ReregisterSlaveMessage &&  incomingMessage 
)
void mesos::internal::master::Master::resourceRequest ( const process::UPID from,
const FrameworkID &  frameworkId,
const std::vector< Request > &  requests 
)
void mesos::internal::master::Master::reviveOffers ( const process::UPID from,
const FrameworkID &  frameworkId,
const std::vector< std::string > &  role 
)
void mesos::internal::master::Master::schedulerMessage ( const process::UPID from,
FrameworkToExecutorMessage &&  frameworkToExecutorMessage 
)
void mesos::internal::master::Master::sendSlaveLost ( const SlaveInfo &  slaveInfo)
protected
void mesos::internal::master::Master::statusUpdate ( StatusUpdateMessage &&  statusUpdateMessage)
void mesos::internal::master::Master::statusUpdateAcknowledgement ( const process::UPID from,
StatusUpdateAcknowledgementMessage &&  statusUpdateAcknowledgementMessage 
)
void mesos::internal::master::Master::submitScheduler ( const std::string &  name)
void mesos::internal::master::Master::throttled ( process::MessageEvent &&  event,
const Option< std::string > &  principal 
)
protected
void mesos::internal::master::Master::unregisterFramework ( const process::UPID from,
const FrameworkID &  frameworkId 
)
void mesos::internal::master::Master::unregisterSlave ( const process::UPID from,
const SlaveID &  slaveId 
)
void mesos::internal::master::Master::updateFramework ( Framework framework,
const FrameworkInfo &  frameworkInfo,
const std::set< std::string > &  suppressedRoles 
)
protected
void mesos::internal::master::Master::updateOperation ( Operation *  operation,
const UpdateOperationStatusMessage &  update,
bool  convertResources = true 
)
protected
void mesos::internal::master::Master::updateOperationStatus ( UpdateOperationStatusMessage &&  update)
void mesos::internal::master::Master::updateSlave ( UpdateSlaveMessage &&  message)
void mesos::internal::master::Master::updateSlaveFrameworks ( Slave slave,
const std::vector< FrameworkInfo > &  frameworks 
)
protected
void mesos::internal::master::Master::updateTask ( Task *  task,
const StatusUpdate &  update 
)
protected
void mesos::internal::master::Master::updateUnavailability ( const MachineID &  machineId,
const Option< Unavailability > &  unavailability 
)
Option<Error> mesos::internal::master::Master::validateFrameworkAuthentication ( const FrameworkInfo &  frameworkInfo,
const process::UPID from 
)
protected

Friends And Related Function Documentation

friend struct Framework
friend
friend struct FrameworkMetrics
friend
friend struct Metrics
friend
friend struct Slave
friend
friend struct SlavesWriter
friend
friend struct Subscriber
friend
InverseOffer* validation::offer::getInverseOffer ( Master master,
const OfferID &  offerId 
)
friend
Offer* validation::offer::getOffer ( Master master,
const OfferID &  offerId 
)
friend
Slave* validation::offer::getSlave ( Master master,
const SlaveID &  slaveId 
)
friend

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