Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix][broker] log update in class:LeastResourceUsageWithWeight #20168

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ private double getMaxResourceUsageWithWeight(final String broker, final BrokerLo
overloadThreshold * 100,
brokerLoadData.toString(conf));
} else if (debugMode) {
log.info("Broker {} load data:{{}}", broker, brokerLoadData.toString(conf));
log.debug("Broker {} load data:{{}}", broker, brokerLoadData.toString(conf));
}


Expand Down Expand Up @@ -118,7 +118,7 @@ public Optional<String> select(
final double diffThreshold =
conf.getLoadBalancerAverageResourceUsageDifferenceThresholdPercentage() / 100.0;
if (debugMode) {
log.info("Computed avgUsage:{}, diffThreshold:{}", avgUsage, diffThreshold);
log.debug("Computed avgUsage:{}, diffThreshold:{}", avgUsage, diffThreshold);
}
for (String broker : candidates) {
var brokerLoadDataOptional = context.brokerLoadDataStore().get(broker);
Expand All @@ -136,14 +136,14 @@ public Optional<String> select(
if (bestBrokers.isEmpty()) {
// Assign randomly as all brokers are overloaded.
if (debugMode) {
log.info("Assign randomly as none of the brokers are underloaded. candidatesSize:{}, "
log.debug("Assign randomly as none of the brokers are underloaded. candidatesSize:{}, "
+ "noLoadDataBrokersSize:{}", candidates.size(), noLoadDataBrokers.size());
}
bestBrokers.addAll(candidates);
}

if (debugMode) {
log.info("Selected {} best brokers: {} from candidate brokers: {}, noLoadDataBrokers:{}",
log.debug("Selected {} best brokers: {} from candidate brokers: {}, noLoadDataBrokers:{}",
bestBrokers.size(), bestBrokers,
candidates,
noLoadDataBrokers);
Expand Down