VinceMu commented on a change in pull request #8666: URL: https://github.com/apache/kafka/pull/8666#discussion_r435211667
########## File path: core/src/main/scala/kafka/admin/ConsumerGroupCommand.scala ########## @@ -291,14 +291,21 @@ object ConsumerGroupCommand extends Logging { } private def printStates(states: Map[String, GroupState]): Unit = { - for ((groupId, state) <- states) { - if (shouldPrintMemberState(groupId, Some(state.state), Some(1))) { + val stateProps = states.filter{case(groupId,state)=>shouldPrintMemberState(groupId, Some(state.state), Some(1))} Review comment: I wanted to avoid changing any existing behaviour with this PR. In light of this, could we print all the groups regardless of their state when the `--all-groups` flag is given? ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org