zhaohaidao commented on code in PR #14271: URL: https://github.com/apache/kafka/pull/14271#discussion_r1314217697
########## group-coordinator/src/main/java/org/apache/kafka/coordinator/group/consumer/ConsumerGroup.java: ########## @@ -747,4 +749,15 @@ private static Integer decValue(String key, Integer value) { private static Integer incValue(String key, Integer value) { return value == null ? 1 : value + 1; } + + /** + * @return the group formatted as a list group response. + */ + public ListGroupsResponseData.ListedGroup asListedGroup() { + return new ListGroupsResponseData.ListedGroup() + .setGroupId(groupId) + .setProtocolType(ConsumerProtocol.PROTOCOL_TYPE) + .setGroupState(state.toString()); + } Review Comment: done. ########## group-coordinator/src/main/java/org/apache/kafka/coordinator/group/GroupMetadataManager.java: ########## @@ -420,6 +423,18 @@ public Group group(String groupId, long committedOffset) throws GroupIdNotFoundE return group; } + /** + * @return The GenericGroup List filtered by statesFilter or typesFilter. + */ + public ListGroupsResponseData listGroups(ListGroupsRequestData request, long committedOffset) { Review Comment: done. -- 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