Commit Graph

72 Commits

Author SHA1 Message Date
mathieu 550d8b8260
KAFKA-8744: Update Scala API to give names to processors (#9738)
As it's only API extension to match the java API with Named object with lots of duplication, I only tested the logic once.

Reviewers: Bill Bejeck <bbejeck@apache.org>
2021-01-28 09:57:18 -05: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
Xavier Léauté 7947c18b57 MINOR update comments and docs to be gender-neutral
While this is not technically part of KIP-629, I believe this makes our codebase more inclusive as well.

cc gwenshap

Author: Xavier Léauté <xvrl@apache.org>

Reviewers: Gwen Shapira

Closes #9398 from xvrl/neutral-term
2020-10-08 17:05:15 -07:00
Andy Coates dc81d442df
KAFKA-10077: Filter downstream of state-store results in spurious tombstones (#9156)
Reviewers: Guozhang Wang <guozhang@confluent.io>, Matthias J. Sax <matthias@confluent.io>
2020-09-25 13:58:04 -07:00
Yuriy Badalyantc 4662ed4aac
MINOR: Fix build scala 2.12 build after KAFKA-10020 (#9245)
Fixes a problem in which the Serdes class in the same package as
the tests (the old one) overshadows the one we explicitly imported
(the new one), but only in Scala 2.12. Since users (hopefully) don't
put their classes in our packages, they won't face the same problem.

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>, David Arthur <mumrah@gmail.com>, John Roesler <vvcephei@apache.org>
2020-09-02 12:49:47 -05:00
Yuriy Badalyantc d0111d3bcd
KAFKA-10020: Create a new version of a scala Serdes without name clash (KIP-616) (#8955)
Wildcard import of the old org.apache.kafka.streams.scala.Serdes leads
to a name clash because some of implicits has the same names as types
from the scala's std lib. The new oak.streams.scala.serialization.Serdes is
the same as the old Serdes, but without name clashes.
The old one is marked as deprecated.

Also, add missing serdes for UUID, ByteBuffer and Short types in
the new Serdes.

Implements: KIP-616

Reviewers: John Roesler <vvcephei@apache.org>
2020-09-01 16:48:40 -05:00
John Roesler 88d4bc4641
KAFKA-10379: Implement the KIP-478 StreamBuilder#addGlobalStore() (#9148)
From KIP-478, implement the new StreamBuilder#addGlobalStore() overload
that takes a stateUpdateSupplier fully typed Processor<KIn, VIn, Void, Void>.

Where necessary, use the adapters to make the old APIs defer to the new ones,
as well as limiting the scope of this change set.

Reviewers: Boyang Chen <boyang@apache.org>
2020-08-20 14:06:16 -05:00
Matthias J. Sax 194c56fce2
KAFKA-9274: Mark `retries` config as deprecated and add new `task.timeout.ms` config (#8864)
- part of KIP-572
 - deprecates producer config `retries` (still in use)
 - deprecates admin config `retries` (still in use)
 - deprecates Kafka Streams config `retries` (will be ignored)
 - adds new Kafka Streams config `task.timeout.ms` (follow up PRs will leverage this new config)

Reviewers: John Roesler <john@confluent.io>, Jason Gustafson <jason@confluent.io>, Randall Hauch <randall@confluent.io>
2020-07-21 12:19:13 -07:00
Ismael Juma 7f90a58b69
MINOR: Update Scala to 2.13.3 (#8931)
I had to fix several compiler errors due to deprecation of auto application of `()`. A related
Xlint config (`-Xlint:nullary-override`) is no longer valid in 2.13, so we now only enable it
for 2.12. The compiler flagged two new inliner warnings that required suppression and
the semantics of `&` in `@nowarn` annotations changed, requiring a small change in
one of the warning suppressions.

I also removed the deprecation of a number of methods in `KafkaZkClient` as
they should not have been deprecated in the first place since `KafkaZkClient` is an
internal class and we still use these methods in the Controller and so on. This
became visible because the Scala compiler now respects Java's `@Deprecated`
annotation.

Finally, I included a few minor clean-ups (eg using `toBuffer` instead `toList`) when fixing
the compilation warnings.

Noteworthy bug fixes in Scala 2.13.3:

* Fix 2.13-only bug in Java collection converters that caused some operations to perform an extra pass
* Fix 2.13.2 performance regression in Vector: restore special cases for small operands in appendedAll and prependedAll
* Increase laziness of #:: for LazyList
* Fixes related to annotation parsing of @Deprecated from Java sources in mixed compilation

Full release notes:
https://github.com/scala/scala/releases/tag/v2.13.3

Reviewers: Manikumar Reddy <manikumar.reddy@gmail.com>
2020-06-26 10:19:04 -07:00
Matthias J. Sax 712cc5d073
KAFKA-10168: fix StreamsConfig parameter name variable (#8865)
Implements KIP-626.

Reviewers: Boyang Chen <boyang@confluent.io>, John Roesler <john@confluent.io>
2020-06-19 17:41:06 -07:00
Matthias J. Sax 27824baa21
KAFKA-10003: Mark KStream.through() as deprecated and update Scala API (#8679)
- part of KIP-221

Co-authored-by: John Roesler <john@confluent.io>
2020-05-22 08:41:28 -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
Ismael Juma 90bbeedf52
MINOR: Fix Scala 2.13 compiler warnings (#8390)
Once Scala 2.13.2 is officially released, I will submit a follow up PR
that enables `-Xfatal-warnings` with the necessary warning
exclusions. Compiler warning exclusions were only introduced in 2.13.2
and hence why we have to wait for that. I used a snapshot build to
test it in the meantime.

Changes:
* Remove Deprecated annotation from internal request classes
* Class.newInstance is deprecated in favor of
Class.getConstructor().newInstance
* Replace deprecated JavaConversions with CollectionConverters
* Remove unused kafka.cluster.Cluster
* Don't use Map and Set methods deprecated in 2.13:
    - collection.Map +, ++, -, --, mapValues, filterKeys, retain
    - collection.Set +, ++, -, --
* Add scala-collection-compat dependency to streams-scala and
update version to 2.1.4.
* Replace usages of deprecated Either.get and Either.right
* Replace usage of deprecated Integer(String) constructor
* `import scala.language.implicitConversions` is not needed in Scala 2.13
* Replace usage of deprecated `toIterator`, `Traversable`, `seq`,
`reverseMap`, `hasDefiniteSize`
* Replace usage of deprecated alterConfigs with incrementalAlterConfigs
where possible
* Fix implicit widening conversions from Long/Int to Double/Float
* Avoid implicit conversions to String
* Eliminate usage of deprecated procedure syntax
* Remove `println`in `LogValidatorTest` instead of fixing the compiler
warning since tests should not `println`.
* Eliminate implicit conversion from Array to Seq
* Remove unnecessary usage of 3 argument assertEquals
* Replace `toStream` with `iterator`
* Do not use deprecated SaslConfigs.DEFAULT_SASL_ENABLED_MECHANISMS
* Replace StringBuilder.newBuilder with new StringBuilder
* Rename AclBuffers to AclSeqs and remove usage of `filterKeys`
* More consistent usage of Set/Map in Controller classes: this also fixes
deprecated warnings with Scala 2.13
* Add spotBugs exclusion for inliner artifact in KafkaApis with Scala 2.12.

Reviewers: Manikumar Reddy <manikumar.reddy@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>
2020-04-01 06:20:48 -07: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
high.lee dc89c86d43
KAFKA-9483: Add Scala KStream#toTable to the Streams DSL (#8024)
Part of KIP-523

Reviewers: Matthias J. Sax <matthias@confluent.io>, Bill Bejeck <bill@confluent.io>, John Roesler <john@confluent.io>
2020-02-11 14:15:43 -08:00
Matthias J. Sax 1ccca5c6a9
KAFKA-6049: extend Kafka Streams Scala API for cogroup (KIP-150) (#7847)
Reviewers: John Roesler <john@confluent.io>, Bill Bejeck <bill@confluent.io>
2020-01-08 15:28:51 -08:00
Ismael Juma 6dc6f6a60d
KAFKA-9324: Drop support for Scala 2.11 (KIP-531) (#7859)
* Adjust build and documentation.
* Use lambda syntax for SAM types in `core`, `streams-scala` and
`connect-runtime` modules.
* Remove `runnable` and `newThread` from `CoreUtils` as lambda
syntax for SAM types make them unnecessary.
* Remove stale comment in `FunctionsCompatConversions`,
`KGroupedStream`, `KGroupedTable' and `KStream` about Scala 2.11,
the conversions are needed for Scala 2.12 too.
* Deprecate `org.apache.kafka.streams.scala.kstream.Suppressed`
and use `org.apache.kafka.streams.kstream.Suppressed` instead.
* Use `Admin.create` instead of `AdminClient.create`. Static methods
in Java interfaces can be invoked since Scala 2.12. I noticed that
MirrorMaker 2 uses `AdminClient.create`, but I did not change them
as Connectors have restrictions on newer client APIs.
* Improve efficiency in a few `Gauge` implementations by avoiding
unnecessary intermediate collections.
* Remove pointless `Option.apply` in `ZookeeperClient`
`SessionState` metric.
* Fix unused import/variable and other compiler warnings.
* Reduce visibility of some vals/defs.

Reviewers: Manikumar Reddy <manikumar@confluent.io>, Guozhang Wang <wangguoz@gmail.com>, Gwen Shapira <gwen@confluent.io>
2020-01-06 19:51:01 +01:00
Matthias J. Sax 5a65da5fe9
MINOR: Kafka Streams Scala API cleanup (#7852)
Reviewers: Bill Bejeck <bill@confluent.io>
2019-12-20 13:18:16 -08:00
Alex Kokachev 7f5c380c34 KAFKA-9011: Removed multiple calls to supplier.get() in order to avoid multiple transformer instances being created. (#7685)
This is a followup PR for #7520 to address issue of multiple calls to get() as it was pointed out by @bbejeck in #7520 (comment)

Reviewers: Bill Bejeck <bbejeck@gmail.com>
2019-11-14 16:12:08 -05:00
Alex Kokachev 9a125a72a2 KAFKA-9011: Scala bindings for flatTransform and flatTransformValues in KStream (#7520)
Reviewers: John Roesler <john@confluent.io>, Bill Bejeck <bbejeck@gmail.com>
2019-11-12 10:23:24 -05:00
Matthias J. Sax 2421a69556 MINOR: Fix Kafka Streams JavaDocs with regard to new StreamJoined class (#7627)
Reviewers: Bruno Cadonna <bruno@confluent.io>, Bill Bejeck <bbejeck@gmail.com>
2019-11-01 17:14:57 -04:00
huxi 7c4b029df9 KAFKA-8944: Fixed KTable compiler warning. (#7393)
https://issues.apache.org/jira/browse/KAFKA-8944

Reviewers: Bill Bejeck <bbejeck@gmail.com>
2019-10-08 23:40:21 -04: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
Adam Bellemare c87fe9402c KAFKA-3705 Added a foreignKeyJoin implementation for KTable. (#5527)
https://issues.apache.org/jira/browse/KAFKA-3705

Allows for a KTable to map its value to a given foreign key and join on another KTable keyed on that foreign key. Applies the joiner, then returns the tuples keyed on the original key. This supports updates from both sides of the join.

Reviewers: Guozhang Wang <wangguoz@gmail.com>, Matthias J. Sax <mjsax@apache.org>,  John Roesler <john@confluent.io>, Boyang Chen <boyang@confluent.io>, Christopher Pettitt <cpettitt@confluent.io>, Bill Bejeck <bbejeck@gmail.com>, Jan Filipiak <Jan.Filipiak@trivago.com>, pgwhalen, Alexei Daniline
2019-10-03 18:59:31 -04:00
Bill Bejeck 6925775e63 KAFKA-8558: Add StreamJoined config object to join (#7285)
Reviewer: John Roesler <john@confluent.io>, Matthias J. Sax <matthias@confluent.io>
2019-10-02 20:32:18 -07:00
Michał Siatkowski 45c800ff01 KAFKA-8911: Using proper WindowSerdes constructors in their implicit definitions (#7352)
Detailed info is available in the ticket: https://issues.apache.org/jira/browse/KAFKA-8911

Briefly, implicit defs are calling empty constructors, which exists only for reflection object creation.
Therefore, while using the implicit definitons, a NPE occurs when Serde is called.

Reviewers: John Roesler <john@confluent.io>, Bill Bejeck <bbejeck@gmail.com>
2019-09-30 18:53:25 -04:00
Ismael Juma 6dd4ebcea7
MINOR: Make the build compile with Scala 2.13 (#6989)
Scala 2.13 support was added to build via #5454. This PR adjusts the code so that
it compiles with 2.11, 2.12 and 2.13.

Changes:
* Add `scala-collection-compat` dependency.
* Import `scala.collection.Seq` in a number of places for consistent behavior between
Scala 2.11, 2.12 and 2.13.
* Remove wildcard imports that were causing the Java classes to have priority over the
Scala ones, related Scala issue: https://github.com/scala/scala/pull/6589.
* Replace parallel collection usage with `Future`. The former is no longer included by
default in the standard library.
* Replace val _: Unit workaround with one that is more concise and works with Scala 2.13
* Replace `filterKeys` with `filter` when we expect a `Map`. `filterKeys` returns a view
that doesn't implement the `Map` trait in Scala 2.13.
* Replace `mapValues` with `map` or add a `toMap` as an additional transformation
when we expect a `Map`. `mapValues` returns a view that doesn't implement the
`Map` trait in Scala 2.13.
* Replace `breakOut` with `iterator` and `to`, `breakOut` was removed in Scala
2.13.
* Replace to() with toMap, toIndexedSeq and toSet
* Replace `mutable.Buffer.--` with `filterNot`.
* ControlException is an abstract class in Scala 2.13.
* Variable arguments can only receive arrays or immutable.Seq in Scala 2.13.
* Use `Factory` instead of `CanBuildFrom` in DecodeJson. `CanBuildFrom` behaves
a bit differently in Scala 2.13 and it's been deprecated. `Factory` has the behavior
we need and it's available via the compat library.
* Fix failing tests due to behavior change in Scala 2.13,
"Map.values.map is not strict in Scala 2.13" (https://github.com/scala/bug/issues/11589).
* Use Java collections instead of Scala ones in StreamResetter (a Java class).
* Adjust CheckpointFile.write to take an `Iterable` instead of `Seq` to avoid
unnecessary collection copies.
* Fix DelayedElectLeader to use a Map instead of Set and avoid `to` call that
doesn't work in Scala 2.13.
* Use unordered map for mapping in SimpleAclAuthorizer, mapping of ordered
maps require an `Ordering` in Scala 2.13 for safety reasons.
* Adapt `ConsumerGroupCommand` to compile with Scala 2.13.
* CoreUtils.min takes an `Iterable` instead of `TraversableOnce`, the latter does
not exist in Scala 2.13.
* Replace `Unit` with `()` in a couple places. Scala 2.13 is stricter when it expects
a value instead of a type.
* Fix bug in CustomQuotaCallbackTest where we did not necessarily set `partitionRatio`
correctly, `forall` can terminate early.
* Add a couple of spotbugs exclusions that are needed by code generated by Scala 2.13
* Remove unused variables, simplify some code and remove procedure syntax in a few
places.
* Remove unused `CoreUtils.JSONEscapeString`.

Reviewers: Manikumar Reddy <manikumar.reddy@gmail.com>, José Armando García Sancio <jsancio@users.noreply.github.com>
2019-07-02 06:29:39 -07:00
Matthias J. Sax 8a237f599a KAFKA-6455: Session Aggregation should use window-end-time as record timestamp (#6645)
For session-windows, the result record should have the window-end timestamp as record timestamp.

Rebased to resolve merge conflicts. Removed unused classes TupleForwarder and ForwardingCacheFlushListener (replace with TimestampedTupleForwarder, SessionTupleForwarder, TimestampedCacheFlushListerner, and SessionCacheFlushListener)

Reviewers: John Roesler <john@confluent.io>, Bruno Cadonna <bruno@confluent.io>, Boyang Chen <boyang@confluent.io>, Bill Bejeck <bill@confluent.io>, Guozhang Wang <wangguoz@gmail.com>
2019-05-12 15:31:44 -07:00
Ismael Juma a37282415e
MINOR: Upgrade dependencies for Kafka 2.3 (#6665)
Many patch and minor updates.

Scalatest and Jetty deprecated classes that we
use. I removed usages for the former and filed KAFKA-8316 for the latter (I
suppressed the relevant deprecation warnings until the JIRA is fixed). As
part of the scalatest fixes, I also removed `TestUtils.fail` since it duplicates
`Assertions.fail`.

I also fixed a few compiler warnings that have crept in since my last sweep.

Updates of note:
- Jetty: 9.4.14 -> 9.4.18
  * https://github.com/eclipse/jetty.project/releases/tag/jetty-9.4.15.v20190215
  * https://github.com/eclipse/jetty.project/releases/tag/jetty-9.4.16.v20190411
  * https://github.com/eclipse/jetty.project/releases/tag/jetty-9.4.17.v20190418
  * https://github.com/eclipse/jetty.project/releases/tag/jetty-9.4.17.v20190418
  * https://github.com/eclipse/jetty.project/releases/tag/jetty-9.4.18.v20190429
- zstd: 1.3.8-1 -> 1.4.0-1
  * https://github.com/facebook/zstd/releases/tag/v1.4.0
  * zstd's fastest strategy, 6-8% faster in most scenarios
- zookeeper: 3.4.13 -> 3.4.14
  * https://zookeeper.apache.org/doc/r3.4.14/releasenotes.html

### Committer Checklist (excluded from commit message)
- [ ] Verify design and implementation 
- [ ] Verify test coverage and CI build status
- [ ] Verify documentation (including upgrade notes)

Reviewers: Manikumar Reddy <manikumar.reddy@gmail.com>
2019-05-03 10:35:07 -07:00
Casey Green b7d7f7590d KAFKA-7778: Add KTable.suppress to Scala API (#6314)
Detailed description

* Adds KTable.suppress to the Scala API.
* Fixed count in KGroupedStream, SessionWindowedKStream, and TimeWindowedKStream so that the value serde gets passed down to the KTable returned by the internal mapValues method.
* Suppress API support for Java 1.8 + Scala 2.11

Testing strategy

I added unit tests covering:

* Windowed KTable.count.suppress w/ Suppressed.untilTimeLimit
* Windowed KTable.count.suppress w/ Suppressed.untilWindowCloses
* Non-windowed KTable.count.suppress w/ Suppressed.untilTimeLimit
* Session-windowed KTable.count.suppress w/ Suppressed.untilWindowCloses

Reviewers: John Roesler <john@confluent.io>, Guozhang Wang <guozhang@confluent.io>
2019-04-15 16:27:19 -07:00
Bill Bejeck c74acb24eb
MINOR: Remove line for testing repartition topic name (#6488)
With KIP-307 joined.name() is deprecated plus we don't need to test for repartition topic names.
Reviewers: Matthias J. Sax <mjsax@apache.org>
2019-03-24 12:47:58 -04:00
Massimo Siani 853f24a4a1 KAFKA-7027: Add an overload build method in scala (#6373)
The Java API can pass a Properties object to StreamsBuilder#build, to allow, e.g., topology optimization, while the Scala API does not yet. The latter only delegates the work to the underlying Java implementation.

Reviewers: John Roesler <john@confluent.io>,  Bill Bejeck <bbejeck@gmail.com>
2019-03-15 10:56:48 -04:00
Matthias J. Sax 0ef2b4ccce MINOR: fix Scala compiler warning (#6417)
Reviewers: Guozhang Wang <wangguoz@gmail.com>,  Bill Bejeck <bbejeck@gmail.com>
2019-03-09 08:09:07 -05:00
John Roesler ccd3af1566 Minor resolve streams scala warnings (#6369)
Resolves the compiler warnings when building streams-scala.

Reviewers: A. Sophie Blee-Goldman <ableegoldman@gmail.com>, Ismael Juma <ismael@juma.me.uk>, Guozhang Wang <wangguoz@gmail.com>
2019-03-07 15:05:35 -08:00
Matthias J. Sax 240d7589d6 MINOR: improve JavaDocs about global state stores (#6359)
Improve JavaDocs about global state stores.

Reviewers: Guozhang Wang <wangguoz@gmail.com>, Sophie Blee-Goldman <sophie@confluent.io>,  Bill Bejeck <bbejeck@gmail.com>
2019-03-06 21:19:47 -05: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
Bill Bejeck 86b1150e18 MINOR: Update Streams Scala API for addition of Grouped (#5793)
While working on the documentation updates I realized the Streams Scala API needs
to get updated for the addition of Grouped

Added a test for Grouped.scala ran all streams-scala tests and streams tests

Reviewers: Matthias J. Sax <matthias@confluent.io>, John Roesler <john@confluent.io>, Guozhang Wang <guozhang@confluent.io>
2018-10-16 07:24:50 -07:00
John Roesler f047e1c178 MINOR: fix non-deterministic streams-scala tests (#5792)
Stop using current system time by default, as it introduces non-determinism.

Reviewers: Matthias J. Sax <matthias@confluent.io>, Bill Bejeck <bill@confluent.io>, Guozhang Wang <guozhang@confluent.io>
2018-10-15 17:47:20 -07: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
Joan Goyeau af80dccc7d KAFKA-7399: KIP-366, Make FunctionConversions deprecated (#5562)
Reviewers: John Roesler <vvcephei@users.noreply.github.com>, Guozhang Wang <wangguoz@gmail.com>
2018-09-19 09:10:15 -07:00
John Roesler b18c8dda52 MINOR: fix scala serde tests (#5644)
Reviewers: Guozhang Wang <wangguoz@gmail.com>
2018-09-13 08:29:07 -07:00
John Roesler 9dac615d22 KAFKA-7386: streams-scala should not cache serdes (#5622)
Currently, scala.Serdes.String, for example, invokes Serdes.String() once and caches the result.

However, the implementation of the String serde has a non-empty configure method that is variant in whether it's used as a key or value serde. So we won't get correct execution if we create one serde and use it for both keys and values.

Reviewers: Bill Bejeck <bill@confluent.io>, Guozhang Wang <wangguoz@gmail.com>
2018-09-11 16:17:47 -07:00
Joan Goyeau acd3858ea6 KAFKA-7396: Materialized, Serialized, Joined, Consumed and Produced with implicit Serdes (#5551)
We want to make sure that we always have a serde for all Materialized, Serialized, Joined, Consumed and Produced.
For that we can make use of the implicit parameters in Scala.

KIP: https://cwiki.apache.org/confluence/display/KAFKA/KIP-365%3A+Materialized%2C+Serialized%2C+Joined%2C+Consumed+and+Produced+with+implicit+Serde

Reviewers: John Roesler <vvcephei@users.noreply.github.com>, Matthias J. Sax <matthias@confluent.io>, Bill Bejeck <bbejeck@gmail.com>, Guozhang Wang <guozhang@confluent.io>, Ted Yu <yuzhihong@gmail.com>
2018-09-11 14:08:42 -07:00
Ewen Cheslack-Postava 0d535b167a MINOR: Mark new Scala streams tests as integration tests (KIP-270 follow-up) (#5631)
Reviewers: Eno Thereska <eno.thereska@gmail.com>, John Roesler <vvcephei@users.noreply.github.com>, Guozhang Wang <wangguoz@gmail.com>
2018-09-10 09:53:02 -07:00
tedyu 34d9ae6628 MINOR: Fix streams Scala peek recursive call (#5566)
This PR fixes the previously recursive call of Streams Scala peek

Reviewers: Joan Goyeau <joan@goyeau.com>, Guozhang Wang <guozhang@confluent.io>, John Roesler <john@confluent.io>
2018-08-29 09:34:01 -07:00
Joan Goyeau 7d2b95895a MINOR: Correct folder for package object scala (#5573)
Reviewers: Guozhang Wang <guozhang@confluent.io>, John Roesler <john@confluent.io>
2018-08-27 18:44:12 -07:00
Joan Goyeau b8559de23d MINOR: Fix streams Scala foreach recursive call (#5539)
Reviewers: Guozhang Wang <guozhang@confluent.io>, John Roesler <john@confluent.io>
2018-08-23 17:07:39 -07:00
Joan Goyeau d8f9f278a2 KAFKA-7316: Fix Streams Scala filter recursive call #5538
Due to lack of conversion to kstream Predicate, existing filter method in KTable.scala would result in StackOverflowError.

This PR fixes the bug and adds testing for it.

Reviewers: Guozhang Wang <guozhang@confluent.io>, John Roesler <john@confluent.io>
2018-08-23 09:15:27 -07:00
Joan Goyeau dae9c41838 KAFKA-7301: Fix streams Scala join ambiguous overload (#5502)
Join in the Scala streams API is currently unusable in 2.0.0 as reported by @mowczare:
#5019 (comment)

This due to an overload of it with the same signature in the first curried parameter.
See compiler issue that didn't catch it: https://issues.scala-lang.org/browse/SI-2628

Reviewers: Debasish Ghosh <dghosh@acm.org>, Guozhang Wang <guozhang@confluent.io>, John Roesler <john@confluent.io>
2018-08-21 15:41:36 -07:00