Repository: mesos Updated Branches: refs/heads/master a6b0f59b5 -> 0277a0015
Moved a comment in the allocator to a more relevant location. Review: https://reviews.apache.org/r/64563/ Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/0277a001 Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/0277a001 Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/0277a001 Branch: refs/heads/master Commit: 0277a001515e692448827337c188117f68bf06e2 Parents: a6b0f59 Author: Meng Zhu <[email protected]> Authored: Wed Dec 13 12:09:58 2017 -0800 Committer: Benjamin Mahler <[email protected]> Committed: Wed Dec 13 12:09:58 2017 -0800 ---------------------------------------------------------------------- src/master/allocator/mesos/hierarchical.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mesos/blob/0277a001/src/master/allocator/mesos/hierarchical.cpp ---------------------------------------------------------------------- diff --git a/src/master/allocator/mesos/hierarchical.cpp b/src/master/allocator/mesos/hierarchical.cpp index 2b2d1fd..fccd71c 100644 --- a/src/master/allocator/mesos/hierarchical.cpp +++ b/src/master/allocator/mesos/hierarchical.cpp @@ -1725,13 +1725,12 @@ void HierarchicalAllocatorProcess::__allocate() // Calculate the currently available resources on the slave, which // is the difference in non-shared resources between total and // allocated, plus all shared resources on the agent (if applicable). - // Since shared resources are offerable even when they are in use, we - // make one copy of the shared resources available regardless of the - // past allocations. Resources available = slave.available().nonShared(); - // Offer a shared resource only if it has not been offered in - // this offer cycle to a framework. + // Since shared resources are offerable even when they are in use, we + // make one copy of the shared resources available regardless of the + // past allocations. Offer a shared resource only if it has not been + // offered in this offer cycle to a framework. if (framework.capabilities.sharedResources) { available += slave.total.shared(); if (offeredSharedResources.contains(slaveId)) {
