ableegoldman commented on a change in pull request #11609: URL: https://github.com/apache/kafka/pull/11609#discussion_r789561299
########## File path: streams/src/main/java/org/apache/kafka/streams/processor/internals/StreamsMetadataState.java ########## @@ -324,6 +345,45 @@ private void rebuildMetadata(final Map<HostInfo, Set<TopicPartition>> activePart return; } + allMetadata = topologyMetadata.hasNamedTopologies() ? + rebuildMetadataForNamedTopologies(activePartitionHostMap, standbyPartitionHostMap) : + rebuildMetadataForSingleTopology(activePartitionHostMap, standbyPartitionHostMap); + } + + private List<StreamsMetadata> rebuildMetadataForNamedTopologies(final Map<HostInfo, Set<TopicPartition>> activePartitionHostMap, + final Map<HostInfo, Set<TopicPartition>> standbyPartitionHostMap) { + final List<StreamsMetadata> rebuiltMetadata = new ArrayList<>(); + Stream.concat(activePartitionHostMap.keySet().stream(), standbyPartitionHostMap.keySet().stream()) + .distinct() + .forEach(hostInfo -> { + final Set<TopicPartition> activePartitionsOnHost = new HashSet<>(); + final Set<TopicPartition> standbyPartitionsOnHost = new HashSet<>(); + + final Map<String, Set<String>> storeNamesByTopology = new HashMap<>(); + final Map<String, Set<String>> standbyStoreNamesByTopology = new HashMap<>(); + + topologyMetadata.namedTopologiesView().forEach(topologyName -> { + // WIP + }); + + final NamedTopologyStreamsMetadataImpl metadata = new NamedTopologyStreamsMetadataImpl( + hostInfo, + storeNamesByTopology, Review comment: See the latest changes -- lmk if you still have a question here -- 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