Commit Graph

94 Commits

Author SHA1 Message Date
Matthias J. Sax 8c21857877
KAFKA-13722: code cleanup after deprecated StateStore.init() was removed (#18249)
We remove the deprecated overload of StateStore.init() and thus do not
need to cast any longer. This PR removes all unnecessary casts, and
additionally cleans ups all related classed to reduce warnings.

Reviewers: Bill Bejeck <bill@confluent.io>
2024-12-20 14:31:44 -08:00
Ken Huang 2b43c49f51
KAFKA-18050 Upgrade the checkstyle version to 10.20.2 (#17999)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-12-05 10:59:18 +08:00
Matthias J. Sax e4cc5d18f4
MINOR: remove get prefix for internal Kafka Streams methods (#16722)
Reviewers: Lucas Brutschy <lbrutschy@confluent.io>
2024-08-21 14:27:14 -07:00
Matthias J. Sax 3922cadc5d
KAFKA-9738: Deprecate old Processor API (#16742)
Implements KIP-1070, which deprecates:
 - Transformer
 - TransformerSupplier
 - ValueTransformer
 - ValueTransformerSupplier
 - MockProcessorContext

Reviewers: Bill Bejeck <bill@confluent.io>
2024-08-02 12:55:53 -07:00
gongxuanzhang 5a331acad0
KAFKA-10787 apply spotless to `streams:examples` and `streams-scala` (#16378)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-06-18 18:56:46 +08:00
gongxuanzhang 596b945072
KAFKA-16643 Add ModifierOrder checkstyle rule (#15890)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-06-13 15:39:32 +08:00
Matthias J. Sax cd1b7639cb
MINOR: cleanup some warning in Kafka Streams examples (#14547)
Reviewers: Guozhang Wang <wangguoz@gmail.com>
2023-10-13 19:00:22 -07:00
Satish Duggana 8d28c3d55e
MINOR Fix checkstyle failures in streams/examples module. (#13055)
MINOR Fix checkstyle failures in streams/examples module. (#13055)
2022-12-29 16:29:18 +05:30
David Karlsson 4e1b6d3f28
MINOR: Update WordCountTransformerDemo comments (#12470)
Reviewers: Matthias J. Sax <matthias@confluent.io>
2022-12-28 15:39:19 -08:00
vamossagar12 9a793897ec
KAFKA-13152: KIP-770, cache size config deprecation (#12758)
PR implementing KIP-770 (#11424) was reverted as it brought in a regression wrt pausing/resuming the consumer. That KIP also introduced a change to deprecate config CACHE_MAX_BYTES_BUFFERING_CONFIG and replace it with STATESTORE_CACHE_MAX_BYTES_CONFIG.

Reviewers: Anna Sophie Blee-Goldman <ableegoldman@apache.org>
2022-10-20 17:03:50 -07:00
Matthias J. Sax 38b08dfd33
MINOR: revert KIP-770 (#12383)
KIP-770 introduced a performance regression and needs some re-design.

Needed to resolve some conflict while reverting.

This reverts commits 1317f3f77a and 0924fd3f9f.

Reviewers:  Sagar Rao <sagarmeansocean@gmail.com>, Guozhang Wang <guozhang@confluent.io>
2022-07-07 11:19:37 -07:00
CHUN-HAO TANG 6ac7f4ea8f
KAFKA-13821: Update Kafka Streams WordCount demo to new Processor API (#12139)
https://issues.apache.org/jira/browse/KAFKA-13821

Reviewers: Jorge Esteban Quilcate Otoya <quilcate.jorge@gmail.com>, Bill Bejeck <bbejeck@apache.org>
2022-06-28 21:39:32 -04:00
Jorge Esteban Quilcate Otoya fa0324485b
KAFKA-13654: Extend KStream process with new Processor API (#11993)
Updates the KStream process API to cover the use cases
of both process and transform, and deprecate the KStream transform API.

Implements KIP-820

Reviewer: John Roesler <vvcephei@apache.org>
2022-04-19 10:29:28 -05:00
vamossagar12 0924fd3f9f
KAFKA-13152: Replace "buffered.records.per.partition" with "input.buffer.max.bytes" (#11796)
Implements KIP-770

Reviewers: Guozhang Wang <wangguoz@gmail.com>
2022-03-21 17:16:00 -07:00
Rob Leland 06ca4850c5
KAFKA-13666 Don't Only ignore test exceptions for windows OS for certain tests. (#11752)
Tests are swallowing exceptions for supported operating systems, which could hide regressions.

Co-authored-by: Rob Leland <rleland@apache.org>

Reviewer: Bruno Cadonna <cadonna@apache.org>
2022-02-18 14:49:03 +01:00
dengziming b5b590cb67
MINOR: Use bootstrap-server instead of broker-list in doc (#10832)
* MINOR: Use bootstrap-server instead of broker-list in doc

Reviewers: Luke Chen <showuon@gmail.com>
2022-02-14 20:24:20 +08:00
Matthias J. Sax 67cf187603 Revert "KAFKA-13152: Replace "buffered.records.per.partition" with "input.buffer.max.bytes" (#11424)"
This reverts commit 14c6030c6a.
Reason: Implemenation breaks backward compatibility
2022-02-01 14:08:11 -08:00
vamossagar12 14c6030c6a
KAFKA-13152: Replace "buffered.records.per.partition" with "input.buffer.max.bytes" (#11424)
This PR is an implementation of: https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=186878390. The following changes have been made:

* Adding a new config input.buffer.max.bytes applicable at a topology level.
* Adding new config statestore.cache.max.bytes.
* Adding new metric called input-buffer-bytes-total.
* The per partition config buffered.records.per.partition is deprecated.
* The config cache.max.bytes.buffering is deprecated.

Reviewers: Anna Sophie Blee-Goldman <ableegoldman@apache.org>, Guozhang Wang <guozhang@confluent.io>
2022-01-27 21:19:04 -08:00
Luke Chen f9aeebed05
KAFKA-13123: close KeyValueIterator instances in example code and tests (#11105)
Reviewers: Matthias J. Sax <matthias@confluent.io>
2021-07-26 16:23:04 -07:00
John Roesler a08e0cfe65
KAFKA-8410: Update the docs to reference the new PAPI (#10994)
Reviewers: Jim Galasyn <jim.galasyn@confluent.io>, Luke Chen <showuon@gmail.com>, Matthias J. Sax <mjsax@apache.org>
2021-07-13 10:23:50 -05:00
Israel Ekpo b3905d9f71
KAFKA-8613: New APIs for Controlling Grace Period for Windowed Operations (#10926)
Implements KIP-633.

Grace-period is an important parameter and its best to make it the user's responsibility to set it expliclity. Thus, we move off to provide a default and make it a mandatory parameter when creating a window.

Reviewers: A. Sophie Blee-Goldman <sophie@confluent.io>, Luke Chen <showuon@gmail.com>, Matthias J. Sax <matthias@confluent.io>
2021-06-30 17:09:19 -07:00
dengziming 1a16fc139a
KAFKA-10437: Update WordCount examples to use new PAPI (#10701)
Reviewers: Matthias J. Sax <matthias@confluent.io>
2021-06-16 22:24:11 -07:00
Boyang Chen ae8b784537
KAFKA-12499: add transaction timeout verification (#10482)
This PR tries to add the check for transaction timeout for a comparison against commit interval of streams. If transaction timeout is smaller than commit interval, stream should crash and inform user to update their commit interval to be larger or equal to the given transaction timeout, or vise versa.

Reviewers: Matthias J. Sax <matthias@confluent.io>, Guozhang Wang <wangguoz@gmail.com>, A. Sophie Blee-Goldman <sophie@confluent.io>
2021-05-21 15:05:39 -07:00
vamossagar12 b9acc492a5
KAFKA-12313: KIP-725: Streamlining configs for Windowed Deserialisers (#10542)
This PR aims to streamline the configurations for WindowedDeserialisers as described in KIP-725. It deprecates default.windowed.key.serde.inner and default.windowed.value.serde.inner configs in StreamConfig and adds windowed.inner.class.serde. 

Reviewers: Anna Sophie Blee-Goldman<ableegoldman@apache.org>
2021-05-17 10:17:31 -07:00
dengziming e2bffb9086
MINOR: Word count should account for extra whitespaces between words (#10229)
Reviewers: Matthias J. Sax <matthias@confluent.io>
2021-03-01 11:02:28 -08:00
Arjun Satish c8dc74e16d
MINOR: Word count should account for extra whitespaces between words (#10044)
Reviewers: Matthias J. Sax <matthias@confluent.io>
2021-02-04 18:54:08 -08:00
leah f5a2fbac6d
KAFKA-10366 & KAFKA-9649: Implement KIP-659 to allow TimeWindowedDeserializer and TimeWindowedSerde to handle window size (#9253)
See KIP details and discussions here: https://cwiki.apache.org/confluence/display/KAFKA/KIP-659%3A+Improve+TimeWindowedDeserializer+and+TimeWindowedSerde+to+handle+window+size

Deprecates methods that allow users to skip setting a window size when one is needed. Adds a window size streams config to allow the timeWindowedDeserializer to calculate window end time.

Reviewers: Walker Carlson <wcarlson@confluent.io>, John Roesler <vvcephei@apache.org>, Guozhang Wang <wangguoz@gmail.com>
2021-02-01 16:20:35 -08:00
Chia-Ping Tsai bed4c6a33b
KAFKA-12172 Migrate streams:examples module to JUnit 5 (#9857)
This PR includes following changes.
1. replace org.junit.Assert by org.junit.jupiter.api.Assertions
2. replace org.junit by org.junit.jupiter.api
3. replace Before by BeforeEach
4. replace After by AfterEach

Reviewers: Ismael Juma <ismael@confluent.io>
2021-01-13 21:02:13 +08:00
Luke Chen 179ecdf49e
KAFKA-10628: remove all the unnecessary parameters from the tests which are using TopologyTestDriver (#9507)
1. remove unneeded javadoc content.
2. Replace containsKey/setProperty with putIfAbsent
3. refactor the constructor of TopologyTestDriverTest

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2020-11-19 11:23:41 +08:00
John Roesler 58bd0a6ee3
MINOR: TopologyTestDriver should not require dummy parameters (#9477)
TopologyTestDriver comes with a paper cut that it passes through a
config requirement that application.id and bootstrap.servers must be
configured. But these configs are not required in the context of
TopologyTestDriver specifically. This change relaxes the requirement.

Reviewers: Boyang Chen <boyang@apache.org>, Matthias J. Sax <mjsax@apache.org>
2020-10-22 08:19:01 -05:00
John Roesler 659b05f78a
KAFKA-10605: Deprecate old PAPI registration methods (#9448)
Add deprecation annotations to the methods replaced in KIP-478.

Reviewers: Bill Bejeck <bbejeck@apache.org>
2020-10-19 15:29:27 -05:00
John Roesler 2804257fe2
KAFKA-10562: Properly invoke new StateStoreContext init (#9388)
* all wrapping stores should pass StateStoreContext init through to the same
  method on the wrapped store and not translate it to ProcessorContext init
* base-level stores should handle StateStoreContext init so that callers passing
  a non-InternalProcessorContext implementation will be able to initialize the store
* extra tests are added to verify the desired behavior

Reviewers: Guozhang Wang <guozhang@apache.org>
2020-10-07 23:06:53 -05:00
John Roesler 69790a1463
KAFKA-10535: Split ProcessorContext into Processor/StateStore/Record Contexts (#9361)
Migrate different components of the old ProcessorContext interface
into separate interfaces that are more appropriate for their usages.
See KIP-478 for the details.

Reviewers: Guozhang Wang <guozhang@apache.org>, Paul Whalen <pgwhalen@gmail.com>
2020-10-02 18:49:12 -05:00
John Roesler 09d1498e30
KAFKA-10436: Implement KIP-478 Topology changes (#9221)
Convert Topology#addProcessor and #addGlobalStore
Also, convert some of the internals in support of addProcessor

Reviewers: Bill Bejeck <bbejeck@apache.org>
2020-09-09 12:37:21 -05:00
Mickael Maison 8af7b96bfb
KAFKA-10367: Allow running the Streams demo app with a config file (#9131)
Update the 3 WordCount demos to accept a configuration file.

Reviewers: Matthias J. Sax <mjsax@apache.org>
2020-08-22 18:00:00 +02:00
John Roesler 26a217c8e7
MINOR: Streams integration tests should not call exit (#9067)
- replace System.exit with Exit.exit in all relevant classes
- forbid use of System.exit in all relevant classes and add exceptions for others

Co-authored-by: John Roesler <vvcephei@apache.org>
Co-authored-by: Matthias J. Sax <matthias@confluent.io>

Reviewers: Lucas Bradstreet <lucas@confluent.io>, Ismael Juma <ismael@confluent.io>
2020-08-05 13:52:50 -07:00
John Roesler 0e6c8a55b9
KAFKA-10200: Fix testability of PAPI with windowed stores (#8927)
It's currently not possible to unit-test custom processors that use windowed stores,
because the provided windowed store implementations cast the context to
InternalProcessorContext.

This change adds a public API example using windowed stores, and fixes the
casts internally that would make that example fail previously.

Reviewers: A. Sophie Blee-Goldman <sophie@confluent.io>, Bruno Cadonna <bruno@confluent.io>
2020-06-30 11:59:47 -05:00
Paul 075bbcfec4
KAFKA-7523: Add ConnectedStoreProvider to Processor API (#6824)
Implements KIP-401:
 - Add ConnectedStoreProvider interface
 - let Processor/[*]Transformer[*]Suppliers extend ConnectedStoreProvider
 - allows to add and connect state stores to processors/transformers implicitly

Reviewers: Matthias J. Sax <matthias@confluent.io>, John Roesler <john@confluent.io>
2020-05-27 10:57:14 -07:00
John Roesler fd095aaafd
KAFKA-8410: Revert Part 1: processor context bounds (#8414) (#8595)
This reverts commit 29e08fd2c2.
There turned out to be more than expected problems with adding the generic parameters.

Reviewers: Matthias J. Sax <matthias@confluent.io>
2020-05-01 14:26:36 -05:00
John Roesler 29e08fd2c2
KAFKA-8410: Part 1: processor context bounds (#8414)
Add type bounds to the ProcessorContext, which bounds the types that can be forwarded to child nodes.

Reviewers: Matthias J. Sax <matthias@confluent.io>
2020-04-07 13:11:02 -05:00
Matthias J. Sax 21cfd0b453
MINOR: Fix generic types in StreamsBuilder and Topology (#8273)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>, Guozhang Wang <guozhang@confluent.io>, John Roesler <john@confluent.io>
2020-03-19 14:29:15 -07:00
Jukka Karvanen a5a6938c69 KAFKA-8233: TopologyTestDriver test input and output usability improvements (#7378)
Implements KIP-470

Reviewers: Bill Bejeck <bill@confluent.io>, John Roesler <john@confluent.io>, Matthias J. Sax <matthias@confluent.io>
2019-10-07 01:01:58 -07:00
A. Sophie Blee-Goldman 62fbc92e3d KAFKA-8615: Change to track partition time breaks TimestampExtractor (#7054)
The timestamp extractor takes a previousTimestamp parameter which should be the partition time. This PR adds back in partition time tracking for the extractor, and renames previousTimestamp --> partitionTime

Reviewers: Guozhang Wang <wangguoz@gmail.com>, Bill Bejeck <bbejeck@gmail.com>, Matthias J. Sax <mjsax@apache.org>
2019-07-18 13:54:46 -07:00
Kengo Seki 41e1c13a52 MINOR: Fix a wrong description in PipeDemo's javadoc (#6901)
This PR fixes a wrong input stream name in PipeDemo's javadoc.

Reviewers: Kamal Chandraprakash <kamal.chandraprakash@gmail.com>, Jason Gustafson <jason@confluent.io>
2019-07-04 01:00:26 -07:00
Viktor Somogyi-Vass 776041db11 KAFKA-7804: Update docs for topic-command related KIP-377
This PR adds a upgrade notes and changes examples to use the bootstrap-server.

Author: Viktor Somogyi-Vass <viktorsomogyi@gmail.com>

Reviewers: Srinivas <srinivas96alluri@gmail.com>, Manikumar Reddy <manikumar.reddy@gmail.com>

Closes #6118 from viktorsomogyi/topiccommand-adminclient-doc
2019-02-04 13:46:33 -08:00
Matthias J. Sax 046b0087bd
MINOR: improve Streams checkstyle and code cleanup (#5954)
Reviewers: Guozhang Wang <guozhang@confluent.io>, Nikolay Izhikov <nIzhikov@gmail.com>, Ismael Juma <ismael@confluent.io>, Bill Bejeck <bill@confluent.io>
2018-12-11 01:54:41 -08:00
Guozhang Wang 14d3ead19d
MINOR: Remove deprecated callers (#5911)
Callers of 1) Windows#until, 2) Windows#of, 3) Serialized are replaced when possible with the new APIs.

Reviewers: Matthias J. Sax <mjsax@apache.org>, Bill Bejeck <bill@confluent.io>
2018-11-14 17:29:19 -08:00
Ismael Juma 12f310d50e
KAFKA-7612: Fix javac warnings and enable warnings as errors (#5900)
- Use Xlint:all with 3 exclusions (filed KAFKA-7613 to remove the exclusions)
- Use the same javac options when compiling tests (seems accidental that
we didn't do this before)
- Replaced several deprecated method calls with non-deprecated ones:
  - `KafkaConsumer.poll(long)` and `KafkaConsumer.close(long)`
  - `Class.newInstance` and `new Integer/Long` (deprecated since Java 9)
  - `scala.Console` (deprecated in Scala 2.11)
  - `PartitionData` taking a timestamp (one of them seemingly a bug)
  - `JsonMappingException` single parameter constructor
- Fix unnecessary usage of raw types in several places.
- Add @SuppressWarnings for deprecations, unchecked and switch fallthrough in
several places.
- Scala clean-ups (var -> val, ETA expansion warnings, avoid reflective calls)
- Use lambdas to simplify code in a few places
- Add @SafeVarargs, fix varargs usage and remove unnecessary `Utils.mkList` method

Reviewers: Matthias J. Sax <mjsax@apache.org>, Manikumar Reddy <manikumar.reddy@gmail.com>, Randall Hauch <rhauch@gmail.com>, Bill Bejeck <bill@confluent.io>, Stanislav Kozlovski <stanislav_kozlovski@outlook.com>
2018-11-12 22:18:59 -08:00
Nikolay ca641b3e2e KAFKA-7277: Migrate Streams API to Duration instead of longMs times (#5682)
Reviewers: Johne Roesler <john@confluent.io>, Matthias J. Sax <matthias@confluent.io>, Bill Bejeck <bill@confluent.io>, Guozhang Wang <guozhang@confluent.io>
2018-10-04 13:51:39 -07:00
John Roesler d57fe1b053 MINOR: single Jackson serde for PageViewTypedDemo (#5590)
Previously, we depicted creating a Jackson serde for every pojo class, which becomes a burden in practice. There are many ways to avoid this and just have a single serde, so we've decided to model this design choice instead.

Reviewers: Viktor Somogyi <viktorsomogyi@gmail.com>, Bill Bejeck <bill@confluent.io>, Guozhang Wang <wangguoz@gmail.com>
2018-08-31 13:13:42 -07:00