lucasbru commented on code in PR #18268: URL: https://github.com/apache/kafka/pull/18268#discussion_r1903974852
########## group-coordinator/src/main/java/org/apache/kafka/coordinator/group/streams/topics/ConfiguredSubtopology.java: ########## @@ -0,0 +1,50 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.kafka.coordinator.group.streams.topics; + +import org.apache.kafka.common.message.StreamsGroupDescribeResponseData; + +import java.util.Map; +import java.util.Set; +import java.util.stream.Collectors; + +/** + * Internal representation of a subtopology. + * <p> + * The subtopology is configured according to the number of partitions available in the source topics. It has regular expressions already + * resolved and defined exactly the information that is being used by streams groups assignment reconciliation. + * <p> + * Configured subtopologies may be recreated every time the input topics used by the subtopology are modified. + */ +public record ConfiguredSubtopology(Set<String> repartitionSinkTopics, + Set<String> sourceTopics, Review Comment: I added the null checks. I think throwing on empty source topics is incorrect, since we don't require it in the KIP. So we'd need to update the KIP, otherwise the group coordinator will just crash on allowed topologies. -- 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]
