Commit Graph

249 Commits

Author SHA1 Message Date
Bruno Cadonna b9dd203f9a
KAFKA-8319: Make KafkaStreamsTest a non-integration test class (#7382) (#8352)
Previous KafkaStreamsTest takes 2min20s on my local laptop, because lots of its integration test which is producing / consuming records, and checking state directory file system takes lots of time. On the other hand, these tests should be well simplified with mocks.

This test reduces the test from a clumsy integration test class into a unit tests with mocks of its internal modules. And some other test functions should not be in KafkaStreamsTest actually and have been moved to other modular test classes. Now it takes 2s.

Also it helps removing the potential flakiness of the following (some of them are claimed resolved only because we have not seen them recently, but after looking at the test code I can verify they are still flaky):

* KAFKA-5818 (the original JIRA ticket indeed exposed a real issue that has been fixed, but the test itself remains flaky)
* KAFKA-6215
* KAFKA-7921
* KAFKA-7990
* KAFKA-8319
* KAFKA-8427

Reviewers: Bill Bejeck <bill@confluent.io>, John Roesler <john@confluent.io>, Bruno Cadonna <bruno@confluent.io>

This commit was cherry-picked from trunk and adapted.

Co-authored-by: Guozhang Wang <wangguoz@gmail.com>

Reviewers: Guozhang Wang <wangguoz@gmail.com>
2020-03-25 15:03:44 -07:00
Ismael Juma 87b633df4d MINOR: Rat should ignore generated directories (#7729)
For some reason, PR builds are failing due to the `rat` license
check even though it should ignore files included in `.gitignore`.

Reviewers: Jason Gustafson <jason@confluent.io>
2019-11-21 14:58:05 -08:00
Ismael Juma cfc583ed0b MINOR: Update gradle wrapper 2019-11-21 11:42:23 -08:00
Alex Diachenko 45544aef97 KAFKA-7799; Use httpcomponents-client in RestServerTest.
The test `org.apache.kafka.connect.runtime.rest.RestServerTest#testCORSEnabled` assumes Jersey client can send restricted HTTP headers(`Origin`).

Jersey client uses `sun.net.www.protocol.http.HttpURLConnection`.
`sun.net.www.protocol.http.HttpURLConnection` drops restricted headers(`Host`, `Keep-Alive`, `Origin`, etc) based on static property `allowRestrictedHeaders`.
This property is initialized in a static block by reading Java system property `sun.net.http.allowRestrictedHeaders`.

So, if classloader loads `HttpURLConnection` before we set `sun.net.http.allowRestrictedHeaders=true`, then all subsequent changes of this system property won't take any effect(which happens if `org.apache.kafka.connect.integration.ExampleConnectIntegrationTest` is executed before `RestServerTest`).
To prevent this, we have to either make sure we set `sun.net.http.allowRestrictedHeaders=true` as early as possible or do not rely on this system property at all.

This PR adds test dependency on `httpcomponents-client` which doesn't depend on `sun.net.http.allowRestrictedHeaders` system property. Thus none of existing tests should interfere with `RestServerTest`.

Author: Alex Diachenko <sansanichfb@gmail.com>

Reviewers: Gwen Shapira

Closes #6277 from avocader/KAFKA-7799_2.1
2019-02-19 11:50:34 -08:00
Arjun Satish 672cc578ef KAFKA-7503: Connect integration test harness
Expose a programmatic way to bring up a Kafka and Zk cluster through Java API to facilitate integration tests for framework level changes in Kafka Connect. The Kafka classes would be similar to KafkaEmbedded in streams. The new classes would reuse the kafka.server.KafkaServer classes from :core, and provide a simple interface to bring up brokers in integration tests.

Signed-off-by: Arjun Satish <arjunconfluent.io>

Author: Arjun Satish <arjun@confluent.io>
Author: Arjun Satish <wicknicks@users.noreply.github.com>

Reviewers: Randall Hauch <rhauch@gmail.com>, Konstantine Karantasis <konstantine@confluent.io>, Ewen Cheslack-Postava <ewen@confluent.io>

Closes #5516 from wicknicks/connect-integration-test

(cherry picked from commit 69d8d2ea11)
Signed-off-by: Ewen Cheslack-Postava <me@ewencp.org>
2019-01-14 14:09:57 -08:00
John Roesler a20a26ca65 KAFKA-7741: Streams exclude javax dependency (#6121)
As documented in https://issues.apache.org/jira/browse/KAFKA-7741,
the javax dependency we receive transitively from connect is incompatible
with SBT builds.

Streams doesn't use the portion of Connect that needs the dependency,
so we can fix the builds by simply excluding it.

Reviewers: Bill Bejeck <bill@confluent.io>, Guozhang Wang <guozhang@confluent.io>
2019-01-10 15:51:32 -08:00
Ismael Juma d860084dd9 MINOR: Upgrade to Gradle 4.10.3
This includes a fix for an issue that required manual intervention
during the 2.1.0 release: the unexpected existence of a .mapping
file in the Maven repository.

Author: Ismael Juma <ismael@juma.me.uk>

Reviewers: Gwen Shapira <gwenshap@apache.org>

Closes #6083 from ijuma/gradle-4.10.3
2019-01-02 17:17:19 -08:00
Ismael Juma 36fff71d7f KAFKA-7389: Enable spotBugs with Java 11 and disable false positive warnings (#5943)
See https://github.com/spotbugs/spotbugs/issues/756 for details on
the false positives affecting try with resources. An example is:

> RCN | Nullcheck of fc at line 629 of value previously dereferenced in
> org.apache.kafka.common.utils.Utils.readFileAsString(String, Charset)

Reviewers: Manikumar Reddy <manikumar.reddy@gmail.com>
2018-11-30 07:13:30 -08:00
Ismael Juma 347ecd896f MINOR: Update zstd, easymock, powermock, zkclient and build plugins (#5846)
EasyMock 4.0.x includes a change that relies on the caller for inferring
the return type of mock creator methods. Updated a number of Scala
tests for compilation and execution to succeed.

The versions of EasyMock and PowerMock in this PR include full support
for Java 11.

Reviewers: Manikumar Reddy <manikumar.reddy@gmail.com>
2018-11-30 07:13:30 -08:00
John Roesler d07fcd782d KAFKA-7223: Add late-record metrics (#5742)
Add late record metrics, as specified in KIP-328

Reviewers: Bill Bejeck <bill@confluent.io>, Guozhang Wang <guozhang@confluent.io>
2018-10-12 09:13:53 -07:00
Ismael Juma 2c825fbfbd MINOR: Fix remaining core, connect and clients tests to pass with Java 11 (#5771)
- SslFactoryTest should use SslFactory to create SSLEngine
- Use Mockito instead of EasyMock in `ConsoleConsumerTest` as one of
the tests mocks a standard library class and the latest released EasyMock
version can't do that when Java 11 is used.
- Avoid mocking `ConcurrentMap` in `SourceTaskOffsetCommitterTest`
for similar reasons. As it happens, mocking is not actually needed here.

Reviewers: Rajini Sivaram <rajinisivaram@googlemail.com>
2018-10-10 13:33:53 -07:00
Ismael Juma 0b298a5d05 KAFKA-7439; Replace EasyMock and PowerMock with Mockito in clients module
Development of EasyMock and PowerMock has stagnated while Mockito
continues to be actively developed. With the new Java release cadence,
it's a problem to depend on libraries that do bytecode manipulation
and are not actively maintained. In addition, Mockito is also
easier to use.

While updating the tests, I attempted to go from failing test to
passing test. In cases where the updated test passed on the first
attempt, I artificially broke it to ensure the test was still doing its
job.

I included a few improvements that were helpful while making these
changes:

1. Better exception if there are no nodes in `leastLoadedNodes`
2. Always close the producer in `KafkaProducerTest`
3. requestsInFlight producer metric should not hold a reference to
`Sender`

Finally, `Metadata` is no longer final so that we don't need
`PowerMock` to mock it. It's an internal class, so it's OK.

Author: Ismael Juma <ismael@juma.me.uk>

Reviewers: Viktor Somogyi <viktorsomogyi@gmail.com>, Dong Lin <lindong28@gmail.com>

Closes #5691 from ijuma/kafka-7438-mockito
2018-10-10 10:54:37 -07:00
Lee Dongjin 79e381a4ad KAFKA-4514; Add Codec for ZStandard Compression (#2267)
This patch adds support for zstandard compression to Kafka as documented in KIP-110: https://cwiki.apache.org/confluence/display/KAFKA/KIP-110%3A+Add+Codec+for+ZStandard+Compression. 

Reviewers: Ivan Babrou <ibobrik@gmail.com>, Ismael Juma <ismael@juma.me.uk>, Jason Gustafson <jason@confluent.io>
2018-10-09 17:14:53 -07:00
Ismael Juma 69709d70fc MINOR: Update Scala to 2.12.7, lz4-java to 1.5 and others
Highlights:
* 10% compilation speed improvement in Scala 2.12.7:
https://www.scala-lang.org/news/2.12.7
* 10% better decompression speed in lz4 1.8.2 (lz4-java 1.5.0
includes lz4 1.8.3):
https://github.com/lz4/lz4-java/blob/master/CHANGES.md#150
https://github.com/lz4/lz4/releases

Author: Ismael Juma <ismael@juma.me.uk>

Reviewers: Dong Lin <lindong28@gmail.com>

Closes #5715 from ijuma/scala-2.12.7-and-other-updates
2018-09-29 22:29:57 -07:00
Bill Bejeck b74e7e407c MINOR: Enable ignored upgrade system tests - trunk (#5605)
Removed ignore annotations from the upgrade tests. This PR includes the following changes for updating the upgrade tests:

* Uploaded new versions 0.10.2.2, 0.11.0.3, 1.0.2, 1.1.1, and 2.0.0 (in the associated scala versions) to kafka-packages
* Update versions in version.py, Dockerfile, base.sh
* Added new versions to StreamsUpgradeTest.test_upgrade_downgrade_brokers including version 2.0.0
* Added new versions StreamsUpgradeTest.test_simple_upgrade_downgrade test excluding version 2.0.0
* Version 2.0.0 is excluded from the streams upgrade/downgrade test as StreamsConfig needs an update for the new version, requiring a KIP. Once the community votes the KIP in, a minor follow-up PR can be pushed to add the 2.0.0 version to the upgrade test.
* Fixed minor bug in kafka-run-class.sh for classpath in upgrade/downgrade tests across versions.
* Follow on PRs for 0.10.2x, 0.11.0x, 1.0.x, 1.1.x, and 2.0.x will be pushed soon with the same updates required for the specific version.

Reviewers: Eno Thereska <eno.thereska@gmail.com>, John Roesler <vvcephei@users.noreply.github.com>, Guozhang Wang <wangguoz@gmail.com>, Matthias J. Sax <matthias@confluent.io>
2018-09-13 13:46:47 -07:00
Ismael Juma f123d2f18c KAFKA-5887; Replace findBugs with spotBugs and upgrade to Gradle 4.10
findBugs is abandoned, it doesn't work with Java 9 and the Gradle plugin will be deprecated in
Gradle 5.0: https://github.com/gradle/gradle/pull/6664

spotBugs is actively maintained and it supports Java 8, 9 and 10. Java 11 is not supported yet,
but it's likely to happen soon.

Also fixed a file leak in Connect identified by spotbugs.

Manually tested spotBugsMain, jarAll and importing kafka in IntelliJ and running
a build in the IDE.

Author: Ismael Juma <ismael@juma.me.uk>

Reviewers: Colin Patrick McCabe <colin@cmccabe.xyz>, Dong Lin <lindong28@gmail.com>

Closes #5625 from ijuma/kafka-5887-spotbugs
2018-09-10 13:14:00 -07:00
Ismael Juma a8eac1b814 MINOR: Use annotationProcessor instead of compile for JMH annotation processor
This fixes the following Gradle warning:

> The following annotation processors were detected on the compile classpath:
> 'org.openjdk.jmh.generators.BenchmarkProcessor'. Detecting annotation processors
> on the compile classpath is deprecated and Gradle 5.0 will ignore them. Please add
> them to the annotation processor path instead. If you did not intend to use annotation
> processors, you can use the '-proc:none' compiler argument to ignore them.

With this change, the warning went away and `./jmh-benchmarks/jmh.sh` continues
to work.

Author: Ismael Juma <ismael@juma.me.uk>

Reviewers: Dong Lin <lindong28@gmail.com>

Closes #5602 from ijuma/annotation-processor
2018-09-03 10:21:48 -07:00
Andras Katona c580f08b77 KAFKA-7134: KafkaLog4jAppender exception handling with ignoreExceptions (#5415)
Reviewers: Andras Beni <andrasbeni@cloudera.com>, Sandor Murakozi <smurakozi@gmail.com>, Rajini Sivaram <rajinisivaram@googlemail.com>
2018-08-29 12:30:39 +01:00
Ismael Juma e8e3e34c67 KAFKA-7309; Upgrade Jacoco for Java 11 support
Jacoco 0.8.2 adds Java 11 support:

https://github.com/jacoco/jacoco/releases/tag/v0.8.2

Java 11 RC1 is out so it would be good for us to
get a working CI build.

Author: Ismael Juma <ismael@juma.me.uk>

Reviewers: Dong Lin <lindong28@gmail.com>

Closes #5568 from ijuma/jacoco-0.8.2
2018-08-25 08:55:15 -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
Manikumar Reddy O 914ffa9dbe KAFKA-7210: Add system test to verify log compaction (#5226)
* Updated TestLogCleaning tool to use Java consumer and rename as LogCompactionTester.
* Enabled the log cleaner in every system test.
* Removed configs from "kafka.properties" with default values and `socket.receive.buffer.bytes`
as the override did not seem necessary.
* Updated `kafka.py` logic to handle duplicates between `kafka.properties` and `server_prop_overrides`.
* Updated Gradle build so that classes from `kafka-clients` test jar can be used in
system tests.

Reviewers: Colin Patrick McCabe <colin@cmccabe.xyz>, Ismael Juma <ismael@juma.me.uk>
2018-08-20 03:46:57 -07:00
Ismael Juma b282b2ab10
KAFKA-7308: Fix rat and checkstyle config for Java 11 support (#5529)
Relative paths in Gradle break when the Gradle daemon is used
unless user.dir can be changed while the process is running.
Java 11 disallows this, so we use project paths instead.

Verified that rat and checkstyle work with Java 11 after these
changes.

Reviewers: Dong Lin <lindong28@gmail.com>
2018-08-18 08:18:28 -07:00
Manikumar Reddy O 68fb2932c9 MINOR: Add spotlessScalaCheck dependency to streams-scala test task (#5479)
Reviewers: Guozhang Wang <wangguoz@gmail.com>
2018-08-13 09:25:36 -07:00
John Roesler b1539ff62d KAFKA-7250: switch scala transform to TransformSupplier (#5481)
#5468 introduced a breaking API change that was actually avoidable. This PR re-introduces the old API as deprecated and alters the API introduced by #5468 to be consistent with the other methods

also, fixed misc syntax problems
2018-08-09 10:11:48 -07:00
Arjun Satish e876c921b0 MINOR: Add connector configs to site-docs
In AK's documentation, the config props for connectors are not listed (https://kafka.apache.org/documentation/#connectconfigs). This PR adds these sink and source connector configs to the html site-docs.

Signed-off-by: Arjun Satish <arjunconfluent.io>

Author: Arjun Satish <arjun@confluent.io>

Reviewers: Ewen Cheslack-Postava <ewen@confluent.io>

Closes #5469 from wicknicks/add-connector-configs-to-docs
2018-08-07 14:34:27 -07:00
Rajini Sivaram 10a0b8a6ba
MINOR: Update build.gradle and release.py to upload streams-scala_2.12 (#5368)
Reviewers: Ismael Juma <ismael@juma.me.uk>, Guozhang Wang <wangguoz@gmail.com>
2018-07-19 11:33:34 +01:00
Joan Goyeau 05c5854d1f MINOR: Add Scalafmt to Streams Scala API (#4965)
Reviewers: Guozhang Wang <wangguoz@gmail.com>
2018-07-09 16:48:34 -07:00
Rajini Sivaram 1aea0834d3
MINOR: Avoid conflicting versions of org.apache.mina for MiniKdc deps (#5336)
`mina-core` is a transitive dependency for `apacheds` and `apacheda`. It is safer to use from `apacheds` since that is the implementation.

Reviewers: Ismael Juma <ismael@juma.me.uk>
2018-07-05 17:07:53 +01:00
Manikumar Reddy O c5b00d20d3 MINOR: Include quota related interfaces to javadocs (#5325) 2018-07-03 19:42:44 +01:00
Ismael Juma 456b17fc8e
MINOR: Upgrade to Gradle 4.8.1 (#5263)
Maven Central dropped support for all versions
but TLS 1.2, so dependency resolution fails if
Gradle builds run with JDK 7. 2.0 and trunk
requre JDK 8, but every other version is
affected.

Reviewers: Rajini Sivaram <rajinisivaram@googlemail.com>
2018-06-21 08:27:04 -07:00
Magesh Nandakumar ee3d3f1b27 KAFKA-7031: Connect API shouldn't depend on Jersey (KIP-285)
Connect API currently depends on Jersey API as a side-effect of KIP-285. It should only depend on the JAX RS API.

Author: Magesh Nandakumar <magesh.n.kumar@gmail.com>

Reviewers: Randall Hauch <rhauch@gmail.com>, Ewen Cheslack-Postava <ewen@confluent.io>

Closes #5190 from mageshn/KAFKA-7031

(cherry picked from commit 51ac53d903)
Signed-off-by: Ewen Cheslack-Postava <me@ewencp.org>
2018-06-12 22:15:47 -07:00
Robert Yokota 16190e9bfd MINOR: Move FileConfigProvider to provider subpackage (#5194)
This moves FileConfigProvider to the org.apache.common.config.provider package to more easily isolate provider implementations going forward.

Reviewers: Konstantine Karantasis <konstantine@confluent.io>, Randall Hauch <rhauch@gmail.com>, Ismael Juma <ismael@juma.me.uk>, Jason Gustafson <jason@confluent.io>
2018-06-12 12:52:51 -07:00
Manikumar Reddy O dbca6b9b88 KAFKA-6562: Make jackson-databind an optional clients dependency (#5110)
Use `provided` scope in Maven.

Reviewers: Rajini Sivaram <rajinisivaram@googlemail.com>, Ismael Juma <ismael@juma.me.uk>
2018-06-12 01:58:58 -07:00
Rajini Sivaram 53c84dbb49
KAFKA-6800: Update SASL/PLAIN and SCRAM docs to use KIP-86 callbacks (#4890) 2018-06-11 11:29:02 +01:00
Ismael Juma 287a92f746
MINOR: Upgrade Gradle to 4.8 and bug fix updates for other deps (#5148)
In addition to Gradle, updated snappy, owasp-dependency-check,
apache directory service api.

Gradle 4.8 fixes a fatal issue when building with Java 11, but
full support is coming in 4.9 or later.
2018-06-07 00:28:07 -07:00
Magesh Nandakumar 642a09168c KAFKA-6991: Fix ServiceLoader issue with PluginClassLoader (KIP-285)
Fix ServiceLoader issue with PluginClassLoader and add basic-auth-extension packaging & classpath

*More detailed description of your change,
if necessary. The PR title and PR message become
the squashed commit message, so use a separate
comment to ping reviewers.*

*Summary of testing strategy (including rationale)
for the feature or bug fix. Unit and/or integration
tests are expected for any behaviour change and
system tests should be considered for larger changes.*

Author: Magesh Nandakumar <magesh.n.kumar@gmail.com>

Reviewers: Konstantine Karantasis <konstantine@confluent.io>, Ewen Cheslack-Postava <ewen@confluent.io>

Closes #5135 from mageshn/KAFKA-6991
2018-06-06 21:09:16 -07:00
Matthias J. Sax 0eddddb82b
KAFKA-6967: TopologyTestDriver does not allow pre-populating state stores that have change logging (#5096)
Reviewers: Guozhang Wang <guozhang@confluent.io>, James Cheng <jylcheng@yahoo.com>, Bill Bejeck <bill@confluent.io>, John Roesler <john@confluent.io>
2018-06-06 15:16:21 -07:00
Magesh Nandakumar 98094954a2 KAFKA-6776: ConnectRestExtension Interfaces & Rest integration (KIP-285)
This PR provides the implementation for KIP-285 and also a reference implementation for authenticating BasicAuth credentials using JAAS LoginModule

Author: Magesh Nandakumar <magesh.n.kumar@gmail.com>

Reviewers: Randall Hauch <rhauch@gmail.com>, Arjun Satish <wicknicks@users.noreply.github.com>, Konstantine Karantasis <konstantine@confluent.io>, Ewen Cheslack-Postava <ewen@confluent.io>

Closes #4931 from mageshn/KIP-285
2018-05-29 21:35:22 -07:00
Chris Egerton a64ab91238 KAFKA-5540: Deprecate internal converter configs (KIP-174)
Implementation of [KIP-174](https://cwiki.apache.org/confluence/display/KAFKA/KIP-174+-+Deprecate+and+remove+internal+converter+configs+in+WorkerConfig)

Configuration properties 'internal.key.converter' and 'internal.value.converter'
are deprecated, and default to org.apache.kafka.connect.json.JsonConverter.

Warnings are logged if values are specified for either, or if properties that
appear to configure instances of internal converters (i.e., ones prefixed with
either 'internal.key.converter.' or 'internal.value.converter.') are given.

The property 'schemas.enable' is also defaulted to false for internal
JsonConverter instances (both for keys and values) if it isn't specified.

Documentation and code have also been updated with deprecation notices and
annotations, respectively.

Unit tests have been updated in `PluginsTest` to account for the new defaults for `schemas.enable` for internal key/value converters, and to ensure that (for the time being), internal key/value converters are still configurable despite being deprecated.

Author: Chris Egerton <chrise@confluent.io>
Author: Ewen Cheslack-Postava <me@ewencp.org>

Reviewers: Randall Hauch <rhauch@gmail.com>, Ewen Cheslack-Postava <ewen@confluent.io>

Closes #4693 from C0urante/kafka-5540
2018-05-29 16:22:47 -07:00
Ron Dagostino 8c5d7e0408 KAFKA-6562: OAuth Authentication via SASL/OAUTHBEARER (KIP-255) (#4994)
This KIP adds the following functionality related to SASL/OAUTHBEARER:

1) Allow clients (both brokers when SASL/OAUTHBEARER is the inter-broker protocol as well as non-broker clients) to flexibly retrieve an access token from an OAuth 2 authorization server based on the declaration of a custom login CallbackHandler implementation and have that access token transparently and automatically transmitted to a broker for authentication.

2) Allow brokers to flexibly validate provided access tokens when a client establishes a connection based on the declaration of a custom SASL Server CallbackHandler implementation.

3) Provide implementations of the above retrieval and validation features based on an unsecured JSON Web Token that function out-of-the-box with minimal configuration required (i.e. implementations of the two types of callback handlers mentioned above will be used by default with no need to explicitly declare them).

4) Allow clients (both brokers when SASL/OAUTHBEARER is the inter-broker protocol as well as non-broker clients) to transparently retrieve a new access token in the background before the existing access token expires in case the client has to open new connections.
2018-05-26 08:18:41 +01:00
Ismael Juma e70a191d30
KAFKA-4423: Drop support for Java 7 (KIP-118) and update deps (#5046)
* Set --source, --target and --release to 1.8.
* Build Scala 2.12 by default.
* Remove some conditionals in the build file now that Java 8
is the minimum version.
* Bump the version of Jetty, Jersey and Checkstyle (the newer
versions require Java 8).
* Fixed issues uncovered by the new version if Checkstyle.
* A couple of minor updates to handle an incompatible source
change in the new version of Jetty.
* Add dependency to jersey-hk2 to fix failing tests caused
by Jersey upgrade.
* Update release script to use Java 8 and to take into account
that Scala 2.12 is now built by default.
* While we're at it, bump the version of Gradle, Gradle plugins,
ScalaLogging, JMH and apache directory api.
* Minor documentation updates including the readme and upgrade
notes. A number of Streams Java 7 examples can be removed
subsequently.
2018-05-21 23:17:42 -07:00
Sean Glover 893e044515 MINOR: Build and code sample updates for Kafka Streams DSL for Scala (#4949)
Several build and documentation updates were required after the merge of KAFKA-6670: Implement a Scala wrapper library for Kafka Streams.

Encode Scala major version into streams-scala artifacts.
To differentiate versions of the kafka-streams-scala artifact across Scala major versions it's required to encode the version into the artifact name before its published to a maven repository. This is accomplished by following a similar release process as kafka core, which encodes the Scala major version and then runs the build for each major version of Scala supported. This is considered standard practice when releasing Scala libraries, but is not handled for us automatically with the basic Scala for Gradle support.

After this change you can generate and install the kafka-streams-scala artifact into the local maven repository:

$ ./gradlew -PscalaVersion=2.11 install
$ ./gradlew -PscalaVersion=2.12 install

Reviewers: Ismael Juma <ismael@juma.me.uk>, Guozhang Wang <wangguoz@gmail.com>
2018-05-06 20:55:12 -07:00
Colin Patrick McCabe aa3c38f595 KAFKA-6785: Add Trogdor documentation (#4862) 2018-04-29 15:57:25 +01:00
Debasish Ghosh b2e4db01b6 KAFKA-6670: Implement a Scala wrapper library for Kafka Streams
This PR implements a Scala wrapper library for Kafka Streams. The library is implemented as a project under streams, namely `:streams:streams-scala`. The PR contains the following:

* the library implementation of the wrapper abstractions
* the test suite
* the changes in `build.gradle` to build the library jar

The library has been tested running the tests as follows:

```
$ ./gradlew -Dtest.single=StreamToTableJoinScalaIntegrationTestImplicitSerdes streams:streams-scala:test
$ ./gradlew -Dtest.single=StreamToTableJoinScalaIntegrationTestImplicitSerdesWithAvro streams:streams-scala:test
$ ./gradlew -Dtest.single=WordCountTest streams:streams-scala:test
```

Author: Debasish Ghosh <ghosh.debasish@gmail.com>
Author: Sean Glover <seglo@randonom.com>

Reviewers: Bill Bejeck <bill@confluent.io>, Matthias J. Sax <matthias@confluent.io>, Ismael Juma <ismael@juma.me.uk>, John Roesler <john@confluent.io>, Damian Guy <damian@confluent.io>, Guozhang Wang <wangguoz@gmail.com>

Closes #4756 from debasishg/scala-streams
2018-04-23 13:33:35 -07:00
John Roesler ed51b2cdf5 KAFKA-6376; refactor skip metrics in Kafka Streams
* unify skipped records metering
* log warnings when things get skipped
* tighten up metrics usage a bit

### Testing strategy:
Unit testing of the metrics and the logs should be sufficient.

Author: John Roesler <john@confluent.io>

Reviewers: Bill Bejeck <bill@confluent.io>, Matthias J. Sax <matthias@confluent.io>, Guozhang Wang <wangguoz@gmail.com>

Closes #4812 from vvcephei/kip-274-streams-skip-metrics
2018-04-23 11:41:03 -07:00
Andras Beni 462342210f KAFKA-3365; Add documentation method for protocol types and update doc generation (#4735)
Reviewers: Sandor Murakozi <smurakozi@gmail.com>, Magnus Edenhill <magnus@edenhill.se>, Jason Gustafson <jason@confluent.io>
2018-04-18 09:18:45 -07:00
Matthias J. Sax cae42215b7
KAFKA-6054: Update Kafka Streams metadata to version 3 (#4880)
- adds Streams upgrade tests for 1.1 release
 - introduces metadata version 3

Reviewers: John Roesler <john@confluent.io>, Guozhang Wang <guozhang@confluent.io>
2018-04-18 09:38:27 +02:00
Manikumar Reddy O 47918f2d79 KAFKA-6447: Add Delegation Token Operations to KafkaAdminClient (KIP-249) (#4427)
Reviewers: Jun Rao <junrao@gmail.com>
2018-04-11 10:48:04 -07:00
Ismael Juma e6b4d17c59
MINOR: Java 10 fixes so that the build passes (#4839)
* Upgrade EasyMock to 3.6 which adds support for Java 10
by upgrading to ASM 6.1.1.

* Ensure that Jacoco is truly disabled for the `core` project.
This was the original intent, since it's in Scala, but it had not
been achieved. This is important because the Jacoco agent
fails when it tries to instrument the classes compiled by
scalac with Java 10.
2018-04-09 03:34:36 -07:00
Matthias J. Sax 0c0d8363e5
KAFKA-6054: Fix upgrade path from Kafka Streams v0.10.0 (#4779)
Reviewers: Guozhang Wang <guozhang@confluent.io>, Bill Bejeck <bill@confluent.io>, John Roesler <john@confluent.io>, Damian Guy <damian@confluent.io>
2018-04-06 17:00:52 -07:00