private Map<Uuid, Set<Integer>> computeTargetPartitions(
        Set<Uuid> subscribeTopicIds,
        SubscribedTopicDescriber subscribedTopicDescriber
    ) {
        Map<Uuid, Set<Integer>> targetPartitions = new HashMap<>();
        subscribeTopicIds.forEach(topicId -> {
            int numPartitions = subscribedTopicDescriber.numPartitions(topicId);
            if (numPartitions == -1) {
                throw new PartitionAssignorException(
                    "Members are subscribed to topic " + topicId
                        + " which doesn't exist in the topic metadata."
                );
            }

            Set<Integer> partitions = new HashSet<>();
            for (int i = 0; i < numPartitions; i++) {
                partitions.add(i);
            }
            targetPartitions.put(topicId, partitions);
        });
        return targetPartitions;
    }
A simple partition assignor that assigns each member all partitions of the subscribed topics.
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/assignor/SimpleAssignor.java