You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by jo...@apache.org on 2015/11/25 18:25:09 UTC
mesos git commit: Corrected typos and formatting issues.
Repository: mesos
Updated Branches:
refs/heads/master 23e996483 -> 1d4421919
Corrected typos and formatting issues.
Review: https://reviews.apache.org/r/40586
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/1d442191
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/1d442191
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/1d442191
Branch: refs/heads/master
Commit: 1d44219191a36f150d6b9bf45d5162d323e04a3e
Parents: 23e9964
Author: Alexander Rukletsov <ru...@gmail.com>
Authored: Wed Nov 25 12:20:32 2015 -0500
Committer: Joris Van Remoortere <jo...@gmail.com>
Committed: Wed Nov 25 12:22:04 2015 -0500
----------------------------------------------------------------------
include/mesos/quota/quota.hpp | 2 +-
src/master/allocator/mesos/hierarchical.cpp | 6 ++----
src/master/allocator/mesos/hierarchical.hpp | 2 +-
3 files changed, 4 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/1d442191/include/mesos/quota/quota.hpp
----------------------------------------------------------------------
diff --git a/include/mesos/quota/quota.hpp b/include/mesos/quota/quota.hpp
index 2f8c31f..b028e12 100644
--- a/include/mesos/quota/quota.hpp
+++ b/include/mesos/quota/quota.hpp
@@ -20,7 +20,7 @@
// ONLY USEFUL AFTER RUNNING PROTOC.
#include <mesos/quota/quota.pb.h>
-// A C++ wrapper for `quotaInfo` used to communicate between the
+// A C++ wrapper for `QuotaInfo` used to communicate between the
// Allocator and Master.
struct Quota
{
http://git-wip-us.apache.org/repos/asf/mesos/blob/1d442191/src/master/allocator/mesos/hierarchical.cpp
----------------------------------------------------------------------
diff --git a/src/master/allocator/mesos/hierarchical.cpp b/src/master/allocator/mesos/hierarchical.cpp
index aee8ced..31ed62e 100644
--- a/src/master/allocator/mesos/hierarchical.cpp
+++ b/src/master/allocator/mesos/hierarchical.cpp
@@ -894,7 +894,6 @@ void HierarchicalAllocatorProcess::setQuota(
const QuotaInfo& quota)
{
CHECK(initialized);
-
CHECK(roles.contains(role));
CHECK(frameworkSorters.contains(role));
@@ -902,7 +901,7 @@ void HierarchicalAllocatorProcess::setQuota(
// the role is not set. Setting quota differs from updating it because
// the former moves the role to a different allocation group with a
// dedicated sorter, while the later just updates the actual quota.
- CHECK(roles[role].quota.isNone());
+ CHECK_NONE(roles[role].quota);
// Persist quota in memory and add the role into the corresponding allocation
// group.
@@ -923,12 +922,11 @@ void HierarchicalAllocatorProcess::removeQuota(
const string& role)
{
CHECK(initialized);
-
CHECK(roles.contains(role));
CHECK(frameworkSorters.contains(role));
// Do not allow removing quota if it is not set.
- CHECK(roles[role].quota.isSome());
+ CHECK_SOME(roles[role].quota);
// TODO(alexr): Print all quota info for the role.
LOG(INFO) << "Removed quota " << roles[role].quota.get().guarantee()
http://git-wip-us.apache.org/repos/asf/mesos/blob/1d442191/src/master/allocator/mesos/hierarchical.hpp
----------------------------------------------------------------------
diff --git a/src/master/allocator/mesos/hierarchical.hpp b/src/master/allocator/mesos/hierarchical.hpp
index 2a21364..1cd8d16 100644
--- a/src/master/allocator/mesos/hierarchical.hpp
+++ b/src/master/allocator/mesos/hierarchical.hpp
@@ -73,6 +73,7 @@ public:
metrics(*this),
roleSorterFactory(_roleSorterFactory),
frameworkSorterFactory(_frameworkSorterFactory),
+ quotaRoleSorter(NULL),
roleSorter(NULL) {}
virtual ~HierarchicalAllocatorProcess() {}
@@ -367,7 +368,6 @@ protected:
hashmap<std::string, Role> roles;
-
// Slaves to send offers for.
Option<hashset<std::string>> whitelist;