dajac commented on code in PR #19611: URL: https://github.com/apache/kafka/pull/19611#discussion_r2095258037
########## group-coordinator/src/main/java/org/apache/kafka/coordinator/group/modern/SubscribedTopicDescriberImpl.java: ########## @@ -19,41 +19,42 @@ import org.apache.kafka.common.Uuid; import org.apache.kafka.coordinator.group.api.assignor.PartitionAssignor; import org.apache.kafka.coordinator.group.api.assignor.SubscribedTopicDescriber; +import org.apache.kafka.image.MetadataImage; +import org.apache.kafka.image.TopicImage; +import org.apache.kafka.metadata.PartitionRegistration; +import java.util.HashSet; import java.util.Map; import java.util.Objects; +import java.util.Optional; import java.util.Set; -import java.util.stream.Collectors; -import java.util.stream.IntStream; /** * The subscribed topic metadata class is used by the {@link PartitionAssignor} to obtain * topic and partition metadata for the topics that the modern group is subscribed to. */ public class SubscribedTopicDescriberImpl implements SubscribedTopicDescriber { /** - * The topic Ids mapped to their corresponding {@link TopicMetadata} - * object, which contains topic and partition metadata. + * The map of topic Ids to the set of allowed partitions for each topic. + * If this is empty, all partitions are allowed. */ - private final Map<Uuid, TopicMetadata> topicMetadata; - private final Map<Uuid, Set<Integer>> topicPartitionAllowedMap; + private final Optional<Map<Uuid, Set<Integer>>> topicPartitionAllowedMap; Review Comment: Using an Optional is better in my opinion. -- 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