protected List<TopicPartition> getAllTopicPartitions(List<String> sortedAllTopics) {
            List<TopicPartition> allPartitions = new ArrayList<>(totalPartitionsCount);

            for (String topic : sortedAllTopics) {
                partitionsPerTopic.get(topic).forEach(p -> allPartitions.add(new TopicPartition(p.topic(), p.partition())));
            }
            return allPartitions;
        }
Builds the assignment.

@return Map from each member to the list of partitions assigned to them.
clients/src/main/java/org/apache/kafka/clients/consumer/internals/AbstractStickyAssignor.java