smjn commented on code in PR #18848:
URL: https://github.com/apache/kafka/pull/18848#discussion_r1954182183
##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/GroupMetadataManager.java:
##########
@@ -6280,6 +6281,29 @@ public void createGroupTombstoneRecords(
group.createGroupTombstoneRecords(records);
}
+ /**
+ * Returns all share partitions keys as a map from the input list of share
groups.
+ * @param shareGroups - A list representing share groups.
+ * @return Map representing the share partition keys for all the groups in
the input.
+ */
+ public Map<String, Map<Uuid, List<Integer>>>
sharePartitionKeysMap(List<ShareGroup> shareGroups) {
+ Map<String, Map<Uuid, List<Integer>>> keyMap = new HashMap<>();
+ if (metadataImage == null) {
+ return Map.of();
+ }
+ TopicsImage topicsImage = metadataImage.topics();
+ for (ShareGroup shareGroup : shareGroups) {
+ String groupId = shareGroup.groupId();
+ for (String topic : shareGroup.subscribedTopicNames().keySet()) {
+ TopicImage topicImage = topicsImage.getTopic(topic);
Review Comment:
Not yet, but we do have another RPC planned
DeleteShareGroupOffsets which will be utilized to do just that.
https://cwiki.apache.org/confluence/display/KAFKA/KIP-932%3A+Queues+for+Kafka#KIP932:QueuesforKafka-DeleteShareGroupOffsetsAPI
--
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]