Sped up Allocator::updateSlave() and Allocator::updateAllocation(). Review: https://reviews.apache.org/r/35682
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/441dd02c Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/441dd02c Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/441dd02c Branch: refs/heads/master Commit: 441dd02cd52a400ef14cc32e5fb5c875f6b81150 Parents: 1e59641 Author: Vinod Kone <[email protected]> Authored: Fri Jun 19 17:39:07 2015 -0700 Committer: Vinod Kone <[email protected]> Committed: Sun Jun 21 11:50:59 2015 -0700 ---------------------------------------------------------------------- src/master/allocator/mesos/hierarchical.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mesos/blob/441dd02c/src/master/allocator/mesos/hierarchical.hpp ---------------------------------------------------------------------- diff --git a/src/master/allocator/mesos/hierarchical.hpp b/src/master/allocator/mesos/hierarchical.hpp index 646ee8c..7097482 100644 --- a/src/master/allocator/mesos/hierarchical.hpp +++ b/src/master/allocator/mesos/hierarchical.hpp @@ -570,7 +570,7 @@ HierarchicalAllocatorProcess<RoleSorter, FrameworkSorter>::updateSlave( // Calculate the current allocation of oversubscribed resources. Resources allocation; foreachkey (const std::string& role, roles) { - allocation += roleSorter->allocation(role)[slaveId].revocable(); + allocation += roleSorter->allocation(role, slaveId).revocable(); } // Update the available resources. @@ -675,7 +675,7 @@ HierarchicalAllocatorProcess<RoleSorter, FrameworkSorter>::updateAllocation( frameworkSorters[frameworks[frameworkId].role]; Resources allocation = - frameworkSorter->allocation(frameworkId.value())[slaveId]; + frameworkSorter->allocation(frameworkId.value(), slaveId); // Update the allocated resources. Try<Resources> updatedAllocation = allocation.apply(operations);
