smjn commented on code in PR #18848:
URL: https://github.com/apache/kafka/pull/18848#discussion_r1954185387
##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/GroupCoordinatorShard.java:
##########
@@ -476,6 +479,33 @@ public
CoordinatorResult<DeleteGroupsResponseData.DeletableGroupResultCollection
return new CoordinatorResult<>(records, resultCollection);
}
+ /**
+ * Method returns all share partition keys corresponding to a list of
groupIds.
+ * The groupIds are first filtered by type to restrict the list to share
groups.
+ * @param groupIds - A list of groupIds as string
+ * @param committedOffset - The last committedOffset for the internal
topic partition
+ * @return A map representing the share partition structure.
+ */
+ public Map<String, Map<Uuid, List<Integer>>> sharePartitions(List<String>
groupIds, long committedOffset) {
+ List<ShareGroup> shareGroups = new ArrayList<>();
+ for (String groupId : groupIds) {
+ try {
+ Group group = groupMetadataManager.group(groupId);
+ if (group instanceof ShareGroup) {
+ shareGroups.add((ShareGroup) group);
+ }
+ } catch (ApiException exception) {
+ // We needn't do anything more than logging here as
deleteGroups
+ // method is handling these cases.
+ // Even if some groups cannot be found, we
+ // must check the entire list.
+ log.error("Failed to find group {}", groupId, exception);
Review Comment:
will change to debug
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]