synchronized void onChange(final Map<HostInfo, Set<TopicPartition>> activePartitionHostMap,
                               final Map<HostInfo, Set<TopicPartition>> standbyPartitionHostMap,
                               final Map<TopicPartition, PartitionInfo> topicPartitionInfo) {
        this.partitionsByTopic = new HashMap<>();
        topicPartitionInfo.forEach((key, value) -> this.partitionsByTopic
                .computeIfAbsent(key.topic(), topic -> new ArrayList<>())
                .add(value));

        rebuildMetadata(activePartitionHostMap, standbyPartitionHostMap);
    }
Respond to changes to the HostInfo -> TopicPartition mapping. Will rebuild the
metadata

@param activePartitionHostMap  the current mapping of {@link HostInfo} -> {@link TopicPartition}s for active partitions
@param standbyPartitionHostMap the current mapping of {@link HostInfo} -> {@link TopicPartition}s for standby partitions
@param topicPartitionInfo      the current mapping of {@link TopicPartition} -> {@Link PartitionInfo}
streams/src/main/java/org/apache/kafka/streams/processor/internals/StreamsMetadataState.java