You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by me...@apache.org on 2016/02/27 14:01:59 UTC
mesos git commit: Added comments for allocator rebalance on weight
updates.
Repository: mesos
Updated Branches:
refs/heads/master 9d8722f96 -> ea7ca2fe3
Added comments for allocator rebalance on weight updates.
Review: https://reviews.apache.org/r/43806/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/ea7ca2fe
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/ea7ca2fe
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/ea7ca2fe
Branch: refs/heads/master
Commit: ea7ca2fe3dd1dae18585bd9bc6276d91bbc8f17f
Parents: 9d8722f
Author: Yongqiao Wang <yq...@cn.ibm.com>
Authored: Sat Feb 27 05:00:51 2016 -0800
Committer: Adam B <ad...@mesosphere.io>
Committed: Sat Feb 27 05:00:51 2016 -0800
----------------------------------------------------------------------
src/master/allocator/mesos/hierarchical.cpp | 5 +++++
1 file changed, 5 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/ea7ca2fe/src/master/allocator/mesos/hierarchical.cpp
----------------------------------------------------------------------
diff --git a/src/master/allocator/mesos/hierarchical.cpp b/src/master/allocator/mesos/hierarchical.cpp
index 1b69fa8..24fa50f 100644
--- a/src/master/allocator/mesos/hierarchical.cpp
+++ b/src/master/allocator/mesos/hierarchical.cpp
@@ -1063,6 +1063,11 @@ void HierarchicalAllocatorProcess::updateWeights(
CHECK(weightInfo.has_role());
weights[weightInfo.role()] = weightInfo.weight();
+ // The allocator only needs to rebalance if there is a framework
+ // registered with this role. The roleSorter contains only roles
+ // for registered frameworks, but quotaRoleSorter contains any role
+ // with quota set, regardless of whether any frameworks are registered
+ // with that role.
if (quotas.contains(weightInfo.role())) {
quotaRoleSorter->update(weightInfo.role(), weightInfo.weight());
}