KAFKA-6813: Remove deprecated APIs in KIP-182, Part II#4976
KAFKA-6813: Remove deprecated APIs in KIP-182, Part II#4976guozhangwang merged 27 commits intoapache:trunkfrom
Conversation
…p120-Kip182-deprecated
…p120-Kip182-deprecated
…gy builder and kstream builder
…uozhangwang/kafka into K6813-part2-store-supplier
bbejeck
left a comment
There was a problem hiding this comment.
Thanks, @guozhangwang. Just a couple of minor comments otherwise LGTM.
| private final String name; | ||
| private final long retentionPeriod; | ||
|
|
||
| private static final int NUM_SEGMENTS = 3; |
There was a problem hiding this comment.
RocksDBSessionStoreSupplier.NUM_SEGMENTS is 3 -- it's not an increase here, is it?
| private final boolean retainDuplicates; | ||
|
|
||
| @SuppressWarnings("deprecation") | ||
| private static final int MIN_SEGMENTS = 2; |
There was a problem hiding this comment.
Should the MIN_SEGMENTS here be 3 as well or should the one above change?
There was a problem hiding this comment.
RocksDBWindowStoreSupplier.MIN_SEMENTS is 2 -- note that MIN_SEGMENTS and NUM_SEGMENTS are two different things.
|
test failures in Java 8 unrelated. retest this please. |
| private final String name; | ||
| private final long retentionPeriod; | ||
|
|
||
| private static final int NUM_SEGMENTS = 3; |
There was a problem hiding this comment.
RocksDBSessionStoreSupplier.NUM_SEGMENTS is 3 -- it's not an increase here, is it?
| private final boolean retainDuplicates; | ||
|
|
||
| @SuppressWarnings("deprecation") | ||
| private static final int MIN_SEGMENTS = 2; |
There was a problem hiding this comment.
RocksDBWindowStoreSupplier.MIN_SEMENTS is 2 -- note that MIN_SEGMENTS and NUM_SEGMENTS are two different things.
| builder.addSource(null, "source", null, null, null, "topic"); | ||
| builder.addProcessor("processor", new MockProcessorSupplier(), "source"); | ||
| builder.addStateStore(new MockStateStoreSupplier("store", true), "processor"); | ||
| builder.addStateStore(storeBuilder, "processor"); |
There was a problem hiding this comment.
the original store is persistent -- but storeBuilder is in-memory -- change intended?
There was a problem hiding this comment.
For this test it does not matter. I was just reusing the store instance.
| final long thirtySecondTimeout = 30 * 1000; | ||
|
|
||
| final TopologyBuilder builder = new TopologyBuilder() | ||
| final Topology topology = new TopologyWrapper() |
There was a problem hiding this comment.
use TopologyWrapper on left hand side and avoid cast below?
There was a problem hiding this comment.
Unfortunately I cannot since once the addXX is called the returned type is Topology. But I refactored the code a bit to not use chained operators:
final TopologyWrapper topology = new TopologyWrapper();
topology.addSource("ingest", Pattern.compile("topic-\\d+"));
topology.addProcessor("my-processor", processorSupplier, "ingest");
topology.addStateStore(storeBuilder, "my-processor");
|
@guozhangwang Build failing with checkstyle error. |
ah right, thanks. |
|
Retest this please |
mjsax
left a comment
There was a problem hiding this comment.
LGTM. Feel free to merge after Jenkins passed.
…-record-version * apache-github/trunk: KAFKA-6894: Improve err msg when connecting processor with global store (apache#5000) KAFKA-6893; Create processors before starting acceptor in SocketServer (apache#4999) MINOR: Fix typo in ConsumerRebalanceListener JavaDoc (apache#4996) MINOR: Remove deprecated valueTransformer.punctuate (apache#4993) MINOR: Update dynamic broker configuration doc for truststore update (apache#4954) KAFKA-6870 Concurrency conflicts in SampledStat (apache#4985) KAFKA-6361: Fix log divergence between leader and follower after fast leader fail over (apache#4882) KAFKA-6813: Remove deprecated APIs in KIP-182, Part II (apache#4976) KAFKA-6878 Switch the order of underlying.init and initInternal (apache#4988) KAFKA-6299; Fix AdminClient error handling when metadata changes (apache#4295) KAFKA-6878: NPE when querying global state store not in READY state (apache#4978) KAFKA 6673: Implemented missing override equals method (apache#4745) KAFKA-6834: Handle compaction with batches bigger than max.message.bytes (apache#4953)
1. Remove the deprecated StateStoreSuppliers, and the corresponding Stores.create() functions and factories: only the base StateStoreSupplier and MockStoreSupplier were still preserved as they are needed by the deprecated TopologyBuilder and KStreamBuilder. Will remove them in a follow-up PR. 2. Add TopologyWrapper.java as the original InternalTopologyBuilderAccessor was removed, but I realized it is still needed as of now. 3. Minor: removed StateStoreTestUtils.java and inline its logic in its callers since now with StoreBuilder it is just a one-liner. Reviewers: Bill Bejeck <bill@confluent.io>, Matthias J. Sax <matthias@confluent.io>
Remove the deprecated StateStoreSuppliers, and the corresponding Stores.create() functions and factories: only the base StateStoreSupplier and MockStoreSupplier were still preserved as they are needed by the deprecated TopologyBuilder and KStreamBuilder. Will remove them in a follow-up PR.
Add TopologyWrapper.java as the original InternalTopologyBuilderAccessor was removed, but I realized it is still needed as of now.
Minor: removed StateStoreTestUtils.java and inline its logic in its callers since now with StoreBuilder it is just a one-liner.
Committer Checklist (excluded from commit message)