AndrewJSchofield commented on code in PR #18848:
URL: https://github.com/apache/kafka/pull/18848#discussion_r1952976685
##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/GroupCoordinatorShard.java:
##########
@@ -476,6 +479,34 @@ 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.
+ * @throws ApiException
+ */
+ public Map<String, Map<Uuid, List<Integer>>> sharePartitions(List<String>
groupIds, long committedOffset) throws ApiException {
+ 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 entre list.
Review Comment:
nit: "entre" should be "entire"
##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/GroupCoordinatorShard.java:
##########
@@ -476,6 +479,34 @@ 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.
+ * @throws ApiException
Review Comment:
No, it doesn't.
--
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]