You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by mz...@apache.org on 2019/05/13 14:57:28 UTC
[mesos] 02/04: Avoided logging quota headroom info when there is no
quota set.
This is an automated email from the ASF dual-hosted git repository.
mzhu pushed a commit to branch 1.8.x
in repository https://gitbox.apache.org/repos/asf/mesos.git
commit 2299746927c5acb13badc034cb02ada63c12bddc
Author: Meng Zhu <mz...@mesosphere.io>
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 282af46..88c0438 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
@@ -2120,11 +2122,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";