Return-Path: X-Original-To: apmail-mesos-commits-archive@www.apache.org Delivered-To: apmail-mesos-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7CED618436 for ; Thu, 7 Jan 2016 09:56:53 +0000 (UTC) Received: (qmail 7003 invoked by uid 500); 7 Jan 2016 09:56:53 -0000 Delivered-To: apmail-mesos-commits-archive@mesos.apache.org Received: (qmail 6977 invoked by uid 500); 7 Jan 2016 09:56:53 -0000 Mailing-List: contact commits-help@mesos.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@mesos.apache.org Delivered-To: mailing list commits@mesos.apache.org Received: (qmail 6968 invoked by uid 99); 7 Jan 2016 09:56:53 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Jan 2016 09:56:53 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 28E01DFBEE; Thu, 7 Jan 2016 09:56:53 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: me@apache.org To: commits@mesos.apache.org Message-Id: <64efe31c29c3458182844b250c8b6ed0@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: mesos git commit: Updated missing allocator comments and removed redundancies. Date: Thu, 7 Jan 2016 09:56:53 +0000 (UTC) Repository: mesos Updated Branches: refs/heads/master 52abf8de3 -> 95406d642 Updated missing allocator comments and removed redundancies. Review: https://reviews.apache.org/r/42002 Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/95406d64 Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/95406d64 Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/95406d64 Branch: refs/heads/master Commit: 95406d6427368b8941d312d690b560affdd5ca1c Parents: 52abf8d Author: Adam B Authored: Wed Jan 6 16:35:49 2016 -0800 Committer: Adam B Committed: Thu Jan 7 01:54:51 2016 -0800 ---------------------------------------------------------------------- include/mesos/master/allocator.hpp | 48 +++++++++++---------------------- 1 file changed, 15 insertions(+), 33 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mesos/blob/95406d64/include/mesos/master/allocator.hpp ---------------------------------------------------------------------- diff --git a/include/mesos/master/allocator.hpp b/include/mesos/master/allocator.hpp index f7ada68..fcebcab 100644 --- a/include/mesos/master/allocator.hpp +++ b/include/mesos/master/allocator.hpp @@ -70,11 +70,9 @@ public: virtual ~Allocator() {} /** - * Initializes the allocator. - * - * Invoked when the master starts up. Any errors in initialization - * should fail fast and result in an ABORT. The master expects the - * allocator to be successfully initialized if this call returns. + * Initializes the allocator when the master starts up. Any errors in + * initialization should fail fast and result in an ABORT. The master expects + * the allocator to be successfully initialized if this call returns. * * @param allocationInterval The allocate interval for the allocator, it * determines how often the allocator should perform the batch @@ -116,8 +114,6 @@ public: const hashmap& quotas) = 0; /** - * Adds a framework. - * * Adds a framework to the Mesos cluster. The allocator is invoked when * a new framework joins the Mesos cluster and is entitled to participate * in resource sharing. @@ -132,8 +128,6 @@ public: const hashmap& used) = 0; /** - * Removes a framework. - * * Removes a framework from the Mesos cluster. It is up to an allocator to * decide what to do with framework's resources. For example, they may be * released and added back to the shared pool of resources. @@ -142,31 +136,26 @@ public: const FrameworkID& frameworkId) = 0; /** - * Activates a framework. - * - * Activates a framework in the Mesos cluster. Offers are only sent to - * active frameworks. + * Activates a framework in the Mesos cluster. + * Offers are only sent to active frameworks. */ virtual void activateFramework( const FrameworkID& frameworkId) = 0; /** - * Deactivates a framework. - * - * Deactivates a framework in the Mesos cluster. Resource offers are not - * sent to deactivated frameworks. + * Deactivates a framework in the Mesos cluster. + * Resource offers are not sent to deactivated frameworks. */ virtual void deactivateFramework( const FrameworkID& frameworkId) = 0; /** - * Updates a framework. + * Updates capabilities of a framework in the Mesos cluster. * - * Updates capabilities of a framework in the Mesos cluster, it will be - * invoked when a framework is re-added. As some of the framework's - * capabilities may be updated when re-added, this API should update the - * capabilities of the newly added framework to Mesos cluster to reflect - * the latest framework info. Please refer to the design document here + * This will be invoked when a framework is re-added. As some of the + * framework's capabilities may be updated when re-added, this API should + * update the capabilities of the newly added framework to Mesos cluster to + * reflect the latest framework info. Please refer to the design document here * https://cwiki.apache.org/confluence/display/MESOS/Design+doc:+Updating+Framework+Info // NOLINT * for more details related to framework update. */ @@ -175,8 +164,6 @@ public: const FrameworkInfo& frameworkInfo) = 0; /** - * Adds an agent. - * * Adds or re-adds an agent to the Mesos cluster. It is invoked when a * new agent joins the cluster or in case of agent recovery. * @@ -196,8 +183,6 @@ public: const hashmap& used) = 0; /** - * Removes an agent. - * * Removes an agent from the Mesos cluster. All resources belonging to this * agent should be released by the allocator. */ @@ -221,8 +206,6 @@ public: const Resources& oversubscribed) = 0; /** - * Activates an agent. - * * Activates an agent. This is invoked when an agent reregisters. Offers * are only sent for activated agents. */ @@ -276,10 +259,11 @@ public: const std::vector& operations) = 0; /** - * TODO (gyliu513): Add more comments after dynamic reservation finished + * Updates available resources on an agent based on a sequence of offer + * operations. Operations may include reserve, unreserve, create or destroy. * * @param slaveId ID of the agent. - * @param operations TODO(gyliu513) + * @param operations The offer operations to apply to this agent's resources. */ virtual process::Future updateAvailable( const SlaveID& slaveId, @@ -351,8 +335,6 @@ public: const FrameworkID& frameworkId) = 0; /** - * Revives offers. - * * Revives offers for a framework. This is invoked by a framework when * it wishes to receive filtered resources or offers immediately. */