diff --git a/app/src/main/java/org/astraea/app/performance/Performance.java b/app/src/main/java/org/astraea/app/performance/Performance.java index 6a218155ff..d5620c024a 100644 --- a/app/src/main/java/org/astraea/app/performance/Performance.java +++ b/app/src/main/java/org/astraea/app/performance/Performance.java @@ -113,12 +113,11 @@ public static List execute(final Argument param) { b -> b.topicPartitionPaths().stream() .anyMatch(p -> param.topics.contains(p.topic()))) - .map(Broker::host) .collect(Collectors.toSet()); - Function size = - host -> + Function size = + broker -> admin.brokers().toCompletableFuture().join().stream() - .filter(b -> b.host().equals(host)) + .filter(b -> b.id() == broker.id()) .mapToLong( b -> b.topicPartitionPaths().stream() @@ -138,9 +137,10 @@ public static List 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);