dajac commented on code in PR #15974:
URL: https://github.com/apache/kafka/pull/15974#discussion_r1605223809


##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/assignor/AbstractUniformAssignmentBuilder.java:
##########
@@ -65,4 +65,33 @@ protected static Set<TopicIdPartition> topicIdPartitions(
                 .mapToObj(i -> new TopicIdPartition(topic, i))
             ).collect(Collectors.toSet());
     }
+
+    /**
+     * Constructs a set of {@code TopicIdPartition} including all the 
partitions that are
+     * currently not assigned to any member.
+     *
+     * @param topicIds                      Collection of topic Ids.
+     * @param subscribedTopicDescriber      Describer to fetch partition 
counts for topics.
+     * @param groupSpec                The group's assignment spec.
+     *
+     *
+     * @return Set of unassigned {@code TopicIdPartition} including newly 
added topic partitions.
+     */
+    protected static Set<TopicIdPartition> unassignedTopicIdPartitions(

Review Comment:
   I just noticed that we already have a loop in 
`OptimizedUniformAssignmentBuilder#buildAssignment` iterating over the 
subscribed topic ids. I would be great if we could merge this one into it.



-- 
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

Reply via email to