AndrewJSchofield commented on code in PR #20168: URL: https://github.com/apache/kafka/pull/20168#discussion_r2207380826
########## tools/src/main/java/org/apache/kafka/tools/consumer/group/ConsumerGroupCommand.java: ########## @@ -1024,6 +1028,21 @@ private Map<TopicPartition, OffsetAndMetadata> prepareOffsetsToReset(String grou return null; } + private void checkAllTopicPartitionsHaveLeader(Collection<TopicPartition> partitionsToReset) { + List<TopicPartition> partitionsWithoutLeader = filterNoneLeaderPartitions(partitionsToReset); + if (!partitionsWithoutLeader.isEmpty()) { + // append the TopicPartition list string Review Comment: nit: You could do this string concatenation much more neatly with something like ``` String partitionStr = partitionsWithoutLeader.stream().map(TopicPartition::toString).collect(Collectors.joining(",")); ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org