Skip to content

Commit

Permalink
[COMMON] use id instead of host
Browse files Browse the repository at this point in the history
  • Loading branch information
chia7712 committed Oct 26, 2024
1 parent a599f2f commit b9ce6cb
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions app/src/main/java/org/astraea/app/performance/Performance.java
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,11 @@ public static List<String> execute(final Argument param) {
b ->
b.topicPartitionPaths().stream()
.anyMatch(p -> param.topics.contains(p.topic())))
.map(Broker::host)
.collect(Collectors.toSet());
Function<String, Long> size =
host ->
Function<Broker, Long> size =
broker ->
admin.brokers().toCompletableFuture().join().stream()
.filter(b -> b.host().equals(host))
.filter(b -> b.id() == broker.id())
.mapToLong(
b ->
b.topicPartitionPaths().stream()
Expand All @@ -138,9 +137,10 @@ public static List<String> execute(final Argument param) {
param.logInterval,
matchedBrokers.stream()
.map(
host ->
broker ->
ReportFormat.CSVContentElement.create(
host, () -> String.valueOf(size.apply(host))))
String.valueOf(broker.id()),
() -> String.valueOf(size.apply(broker))))
.toList()))
.thenAcceptAsync(Runnable::run);

Expand Down

0 comments on commit b9ce6cb

Please sign in to comment.