[KAFKA-18026] migrate KTableSource to use ProcesserSupplier#stores #17903
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.
Description
This PR is part of the implementation for KIP-1112 (KAFKA-18026). In order to have DSL operators be properly wrapped by the interface suggestion in 1112, we need to make sure they all use the
ConnectedStoreProvider#stores
method to connect stores instead of manually callingaddStateStore
.Review Guide
KTableSource
which now implements thestores()
methodforceQueryable
intoMaterializedInternal
so that we directly indicate that it should be queryable/materialized instead of relying on a side effect of setting the store nameStoreDelegatingProcessorSupplier
is used only in the case of GlobalKTables because the stores are expected to be passed in separately in the public API -- this PR doesn't change thatFactoryWrappingStoreBuilder
is used so that already created store factories can be typecast asStoreBuilder
s.NOTE: For point (3), I think this might be a bug in the current implementation that we may want to change in 4.0 since it's backwards incompatible. If you pass in a
ProcessorSupplier
toaddGlobalTable
, thestores()
method on that will be ignored.Testing
This is a refactor only, there is no new behaviors.
Committer Checklist (excluded from commit message)