Skip to content

Commit

Permalink
Remove duplicated filter (#14198)
Browse files Browse the repository at this point in the history
### Motivation
remove duplicated filter for UniformLoadShedder#findBundlesForUnloading

### Modifications
1. correct the java doc for UniformLoadShedder
2. remove  duplicated filter for UniformLoadShedder#findBundlesForUnloading
  • Loading branch information
aloyszhang committed Feb 14, 2022
1 parent a3c8525 commit 1c0e17d
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@
/**
* This strategy tends to distribute load uniformly across all brokers. This strategy checks load difference between
* broker with highest load and broker with lowest load. If the difference is higher than configured thresholds
* {@link ServiceConfiguration#getLoadBalancerMsgRateDifferenceShedderThreshold()} and
* {@link ServiceConfiguration#getLoadBalancerMsgRateDifferenceShedderThreshold()} then it finds out bundles which can
* be unloaded to distribute traffic evenly across all brokers.
* {@link ServiceConfiguration#getLoadBalancerMsgRateDifferenceShedderThreshold()} or
* {@link ServiceConfiguration#loadBalancerMsgThroughputMultiplierDifferenceShedderThreshold()} then it finds out
* bundles which can be unloaded to distribute traffic evenly across all brokers.
*
*/
@Slf4j
Expand Down Expand Up @@ -148,7 +148,6 @@ public Multimap<String, String> findBundlesForUnloading(final LoadData loadData,
: shortTermData.getMsgThroughputIn() + shortTermData.getMsgThroughputOut();
return Triple.of(bundle, bundleData, throughput);
}).filter(e -> !recentlyUnloadedBundles.containsKey(e.getLeft()))
.filter(e -> overloadedBrokerData.getBundles().contains(e.getLeft()))
.sorted((e1, e2) -> Double.compare(e2.getRight(), e1.getRight())).forEach((e) -> {
String bundle = e.getLeft();
BundleData bundleData = e.getMiddle();
Expand Down

0 comments on commit 1c0e17d

Please sign in to comment.