AndrewJSchofield commented on code in PR #20235: URL: https://github.com/apache/kafka/pull/20235#discussion_r2227745369
########## tools/src/main/java/org/apache/kafka/tools/consumer/group/ConsumerGroupCommand.java: ########## @@ -1054,7 +1054,7 @@ private List<TopicPartition> filterNonExistentPartitions(Collection<TopicPartiti .map(partitionInfo -> new TopicPartition(entry.getKey(), partitionInfo.partition()))) .toList(); - return topicPartitions.stream().filter(element -> !existPartitions.contains(element)).toList(); + return topicPartitions.stream().filter(tp -> !existPartitions.contains(tp)).toList(); Review Comment: nit: I think this rename is a bit unhelpful because "tp" does at least have a gentle implication of the type of the elements. ########## tools/src/test/java/org/apache/kafka/tools/consumer/group/ResetConsumerGroupOffsetTest.java: ########## @@ -153,6 +158,33 @@ public void testResetOffsetsNotExistingGroup(ClusterInstance cluster) throws Exc } } + @ClusterTest(brokers = 5) + public void testResetOffsetsWithOfflinePartition(ClusterInstance cluster) throws Exception { + String topic = generateRandomTopic(); + String group = "new.group"; + String[] args = buildArgsForGroup(cluster, group, "--to-earliest", "--execute", "--topic", topic + ":1"); + cluster.createTopic(topic, 3, (short) 2); + + try (ConsumerGroupCommand.ConsumerGroupService service = getConsumerGroupService(args); + Admin admin = cluster.admin()) { Review Comment: nit: The indentation here is a bit strange not being a multiple of 4 spaces. I wonder whether just concatenating this on the end of the previous line would be simplest. -- 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