This is an automated email from the ASF dual-hosted git repository.
mzhu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git
The following commit(s) were added to refs/heads/master by this push:
new 26fa2e5 Avoided logging quota headroom info when there is no quota
set.
26fa2e5 is described below
commit 26fa2e57340b5cc56304767d18488036ef25c64b
Author: Meng Zhu <[email protected]>
AuthorDate: Mon May 13 15:58:43 2019 +0200
Avoided logging quota headroom info when there is no quota set.
Review: https://reviews.apache.org/r/70633
---
src/master/allocator/mesos/hierarchical.cpp | 20 ++++++++++++--------
1 file changed, 12 insertions(+), 8 deletions(-)
diff --git a/src/master/allocator/mesos/hierarchical.cpp
b/src/master/allocator/mesos/hierarchical.cpp
index 83b90d5..875cfcd 100644
--- a/src/master/allocator/mesos/hierarchical.cpp
+++ b/src/master/allocator/mesos/hierarchical.cpp
@@ -1795,9 +1795,11 @@ void HierarchicalAllocatorProcess::__allocate()
slave.getAvailable().revocable().scalars());
}
- LOG(INFO) << "Before allocation, required quota headroom is "
- << requiredHeadroom
- << " and available quota headroom is " << availableHeadroom;
+ if (!quotaGuarantees.empty()) {
+ LOG(INFO) << "Before allocation, required quota headroom is "
+ << requiredHeadroom
+ << " and available quota headroom is " << availableHeadroom;
+ }
// Due to the two stages in the allocation algorithm and the nature of
// shared resources being re-offerable even if already allocated, the
@@ -2125,11 +2127,13 @@ void HierarchicalAllocatorProcess::__allocate()
}
}
- LOG(INFO) << "After allocation, " << requiredHeadroom
- << " are required for quota headroom, "
- << heldBackForHeadroom << " were held back from "
- << heldBackAgentCount
- << " agents to ensure sufficient quota headroom";
+ if (!quotaGuarantees.empty()) {
+ LOG(INFO) << "After allocation, " << requiredHeadroom
+ << " are required for quota headroom, "
+ << heldBackForHeadroom << " were held back from "
+ << heldBackAgentCount
+ << " agents to ensure sufficient quota headroom";
+ }
if (offerable.empty()) {
VLOG(2) << "No allocations performed";