KFK-19871: A, Add Builder and Runtime for Multipartition for TopologyTestDriver#22665
Open
sebastienviale wants to merge 1 commit into
Conversation
Co-authored-by: Marie-Laure Momplot <marie-laure.momplot@michelin.com> Co-authored-by: Julien Brunet <julien.brunet2@michelin.com> Co-authored-by: Adam Souquieres <souquieres.adam@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
As part of KIP-1238: Multi-partition support in
TopologyTestDriver.
TopologyTestDrivercurrently only supports input and output topics with a single partition, making it impossible to test repartition operations without falling back to EmbeddedKafkaCluster-based integration tests.This follow-up to the
TestRecordpartition support PR introduces the multi-partition execution path itself: a builder to declare topic partition counts, a planner that resolves partition counts across the topology, and a runtime that builds one task per partition and drives routing and processing.Changes
TopologyTestDriverBuilder: new entry point with declareTopic(name, partitions) and build(). Multi-partition mode activates automatically when any declared topic has more than one partition; otherwise the legacy single-task path is preserved.MultiPartitionTopologyPlan: resolves the partition count of every topic, including internal repartition topics, and validates co-partitioning.MultiPartitionRuntime: builds one task per (subtopology, partition) and routes/processes records accordingly.TopologyTestDriver: existing constructors are deprecated in favor ofTopologyTestDriverBuilderCompatibility
Fully backward compatible — no existing test requires changes. Single-partition mode (no declared topics, or all declared with 1 partition) behaves exactly as today.