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 <[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 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";
