Skip to content

Commit

Permalink
[improve][broker] Reduce ResourceGroup log (apache#21957)
Browse files Browse the repository at this point in the history
Signed-off-by: Zixuan Liu <[email protected]>
  • Loading branch information
nodece authored Jan 24, 2024
1 parent 480a229 commit 1b5550d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -325,8 +325,10 @@ protected BytesAndMessagesCount getLocalUsageStatsFromBrokerReports(ResourceGrou
retval.bytes = pbus.usedValues.bytes;
retval.messages = pbus.usedValues.messages;
} else {
log.info("getLocalUsageStatsFromBrokerReports: no usage report found for broker={} and monClass={}",
myBrokerId, monClass);
if (log.isDebugEnabled()) {
log.debug("getLocalUsageStatsFromBrokerReports: no usage report found for broker={} and monClass={}",
myBrokerId, monClass);
}
}

return retval;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,10 @@ public long computeLocalQuota(long confUsage, long myUsage, long[] allUsages) th
float calculatedQuota = max(myUsage + residual * myUsageFraction, 1);

val longCalculatedQuota = (long) calculatedQuota;
log.info("computeLocalQuota: myUsage={}, totalUsage={}, myFraction={}; newQuota returned={} [long: {}]",
myUsage, totalUsage, myUsageFraction, calculatedQuota, longCalculatedQuota);
if (log.isDebugEnabled()) {
log.debug("computeLocalQuota: myUsage={}, totalUsage={}, myFraction={}; newQuota returned={} [long: {}]",
myUsage, totalUsage, myUsageFraction, calculatedQuota, longCalculatedQuota);
}

return longCalculatedQuota;
}
Expand Down

0 comments on commit 1b5550d

Please sign in to comment.