Commit Graph

109 Commits

Author SHA1 Message Date
David Arthur d38a90df2b
KAFKA-17672 Run quarantined tests separately (#17329)
Introduce new quarantinedTest that excludes tests tagged with "flaky". Also introduce two new build parameters "maxQuarantineTestRetries" and "maxQuarantineTestRetryFailures".

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-10-06 14:09:24 +08:00
Omnia Ibrahim c2de7c5e54
MINOR: Clarify Spotless instructions in README.md (#16471)
Reviewers: Igor Soarez <soarez@apple.com>
2024-06-27 12:04:08 +01:00
gongxuanzhang 62e5cce184
KAFKA-10787 Update spotless version and remove support JDK8 (#16176)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-06-05 18:57:32 +08:00
gongxuanzhang 342e69192f
KAFKA-10787 Add import ordering checkstyle rule and configure an automatic formatter (#16097)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-06-03 04:02:07 +08:00
Cheng-Kai, Zhang ae44a08051
MINOR: add docker usage documentation link in README.md (#15600)
We have a detail usage guide for running Kafka in docker. However, it might be easy for people to miss it if they only scan through the README.

This PR add a basic example command for quick start and link directing users to the detailed usage guide

Reviewers: Luke Chen <showuon@gmail.com>
2024-03-27 11:11:09 +08:00
Cheng-Kai, Zhang b667e61ea7
KAFKA-16416 Use NetworkClientTest to replace RequestResponseTest to be the example of log4j output (#15596)
Reviewers: Kirk True <kirk@kirktrue.pro>, Chia-Ping Tsai <chia7712@gmail.com>
2024-03-27 01:06:47 +08:00
Ismael Juma 92a67e8571
Note that Java 11 support for broker and tools is deprecated for removal in 4.0 (#15236)
Reviewers: Divij Vaidya <diviv@amazon.com>
2024-01-19 14:08:07 -08:00
Ismael Juma a72056e20d
MINOR: Replace Java 20 with Java 21 in `README.md` (#14451)
Reviewers: Divij Vaidya <diviv@amazon.com>, Yash Mayya <yash.mayya@gmail.com>
2023-09-26 10:29:30 +02:00
Colin Patrick McCabe c7de30f38b
KAFKA-15183: Add more controller, loader, snapshot emitter metrics (#14010)
Implement some of the metrics from KIP-938: Add more metrics for
measuring KRaft performance.

Add these metrics to QuorumControllerMetrics:
    kafka.controller:type=KafkaController,name=TimedOutBrokerHeartbeatCount
    kafka.controller:type=KafkaController,name=EventQueueOperationsStartedCount
    kafka.controller:type=KafkaController,name=EventQueueOperationsTimedOutCount
    kafka.controller:type=KafkaController,name=NewActiveControllersCount

Create LoaderMetrics with these new metrics:
    kafka.server:type=MetadataLoader,name=CurrentMetadataVersion
    kafka.server:type=MetadataLoader,name=HandleLoadSnapshotCount

Create SnapshotEmitterMetrics with these new metrics:
    kafka.server:type=SnapshotEmitter,name=LatestSnapshotGeneratedBytes
    kafka.server:type=SnapshotEmitter,name=LatestSnapshotGeneratedAgeMs

Reviewers: Ron Dagostino <rndgstn@gmail.com>
2023-07-24 21:13:58 -07:00
Said Boudjelda 2e30dd894f
MINOR: add JDK 20 build support to README (#14061)
Adding the value 20 to the JDK version that can build Apache Kafka into README.md

Reviewers: Divij Vaidya <diviv@amazon.com>
2023-07-21 10:45:01 +02:00
Chia-Ping Tsai 3b5bb2f6a2
MINOR: use built-in "--rerun" to replace "-Prerun-tests" (#13343)
Reviewers: Ismael Juma <ismael@juma.me.uk>
2023-03-06 10:53:49 +08:00
Ismael Juma 52bb677bbe
MINOR: Reuse gradle daemon for scala compilation by default (#12280)
The time time to compile was reduced from 5.3 seconds to 0.9 seconds by
changing the keep alive mode from `SESSION` to `DAEMON`. We change the
default to the latter and allow the former to be set via a `keepAliveMode`
property.

Also update the Jenkins build to use `keepAliveMode="session"` instead of
`--no-daemon`.

./gradlew compileTestScala -PkeepAliveMode="daemon" --info:

> Task :streams:streams-scala:compileTestScala
> Watching 928 directories to track changes
> Caching disabled for task ':streams:streams-scala:compileTestScala' because:
>   Build cache is disabled
> Task ':streams:streams-scala:compileTestScala' is not up-to-date because:
>   Input property 'source' file /home/ijuma/src/kafka/streams/streams-scala/src/test/scala/org/apache/kafka/streams/scala/kstream/JoinedTest.scala has changed.
> Watching 920 directories to track changes
> Watching 919 directories to track changes
> Compiling with Zinc Scala compiler.
> Prepared Zinc Scala inputs: 0.004 secs
> compiling 16 Scala sources to /home/ijuma/src/kafka/streams/streams-scala/build/classes/scala/test ...
> done compiling
> Completed Scala compilation: 0.925 secs

./gradlew compileTestScala -PkeepAliveMode="session" --info

> Task :streams:streams-scala:compileTestScala
> Watching 928 directories to track changes
> Caching disabled for task ':streams:streams-scala:compileTestScala' because:
>   Build cache is disabled
> Task ':streams:streams-scala:compileTestScala' is not up-to-date because:
>   Input property 'source' file /home/ijuma/src/kafka/streams/streams-scala/src/test/scala/org/apache/kafka/streams/scala/kstream/JoinedTest.scala has changed.
> Watching 920 directories to track changes
> Watching 919 directories to track changes
> Starting process 'Gradle Worker Daemon 3'. Working directory: /home/ijuma/.gradle/workers Command: /usr/java/jdk-17.0.4.1+1/bin/java -Xss4m -XX:+UseParallelGC --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/java.nio.file=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.base/java.util.regex=ALL-UNNAMED --add-opens=java.base/java.util.stream=ALL-UNNAMED --add-opens=java.base/java.text=ALL-UNNAMED --add-opens=java.base/java.time=ALL-UNNAMED --add-opens=java.security.jgss/sun.security.krb5=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED @/home/ijuma/.gradle/.tmp/gradle-worker-classpath3305983246500958050txt -Xmx2048m -Dfile.encoding=UTF-8 -Duser.country=US -Duser.language=en -Duser.variant worker.org.gradle.process.internal.worker.GradleWorkerMain 'Gradle Worker Daemon 3'
> Successfully started process 'Gradle Worker Daemon 3'
> Started Gradle worker daemon (0.244 secs) with fork options DaemonForkOptions{executable=/usr/java/jdk-17.0.4.1+1/bin/java, minHeapSize=null, maxHeapSize=2048m, jvmArgs=[-Xss4m, -XX:+UseParallelGC, --add-opens=java.base/java.io=ALL-UNNAMED, --add-opens=java.base/java.lang=ALL-UNNAMED, --add-opens=java.base/java.nio=ALL-UNNAMED, --add-opens=java.base/java.nio.file=ALL-UNNAMED, --add-opens=java.base/java.util=ALL-UNNAMED, --add-opens=java.base/java.util.concurrent=ALL-UNNAMED, --add-opens=java.base/java.util.regex=ALL-UNNAMED, --add-opens=java.base/java.util.stream=ALL-UNNAMED, --add-opens=java.base/java.text=ALL-UNNAMED, --add-opens=java.base/java.time=ALL-UNNAMED, --add-opens=java.security.jgss/sun.security.krb5=ALL-UNNAMED], keepAliveMode=SESSION}.
> Compiling with Zinc Scala compiler.
> Prepared Zinc Scala inputs: 0.187 secs
> compiling 16 Scala sources to /home/ijuma/src/kafka/streams/streams-scala/build/classes/scala/test ...
> done compiling
> Completed Scala compilation: 5.307 secs

See https://github.com/gradle/gradle/issues/20579 for more details.

Reviewers: Manikumar Reddy <manikumar.reddy@gmail.com>
2022-12-01 05:33:43 -08:00
Lucas Brutschy 7dcaec4a79
MINOR: Fix usage instruction of skipSigning build parameter (#12731)
skipSigning parameter must be set to a boolean value to work.

Reviewers: Bill Bejeck <bbejeck@apache.org>
2022-10-24 11:55:48 -04:00
Ismael Juma 2e0f9f42dd
MINOR: Inline "Running a Kafka broker in KRaft mode" (#12750)
Also moved KRaft mode above zk mode.

Reviewers: Mickael Maison <mimaison@users.noreply.github.com>
2022-10-18 06:12:25 -07:00
José Armando García Sancio e8e815b1b6
MINOR; Update documentation for printing dependencies (#12610)
Reviewers: Ismael Juma <ismael@juma.me.uk>
2022-10-17 11:27:49 -07:00
John Roesler 322a065b90
KAFKA-13714: Fix cache flush position (#11926)
The caching store layers were passing down writes into lower store layers upon eviction, but not setting the context to the evicted records' context. Instead, the context was from whatever unrelated record was being processed at the time.

Reviewers: Matthias J. Sax <mjsax@apache.org>
2022-03-23 22:09:05 -05:00
John Roesler dcd09de1ed
MINOR: Clarify how to publish specific projects to the local repo (#11938)
The current README instruction for local publishing boils the ocean by building and installing every jar in the project with both 2.12 and 2.13. While that is some times what people want to do, they are also often trying to just build a specific jar.

Reviewers: Bill Bejeck <bbejeck@apache.org>
2022-03-23 13:07:02 -05:00
Kamal Chandraprakash 496aa1f84b
MINOR: Provide valid examples in README page. (#10259)
* MINOR: Provide valid examples in README page.

- `testMetadataUpdateWaitTime` method is removed from MetadataTest class.
-  Removed the travis CI documentation.

Reviewers: Luke Chen <showuon@gmail.com>
2022-02-21 14:48:24 +08:00
Ismael Juma ca375d8004
MINOR: Reduce scala compilation time by 15% via scalac backend parallelism (#11739)
Introduce `maxScalacThreads` and set the default to the lowest of `8`
and the number of processors available to the JVM. The number `8` was
picked empirically, the sweet spot is between 6 and 10.

On my desktop, `./gradlew clean core:compileScala core:compileTestScala`
improved from around 60s to 51s ( with this change.

While at it, we improve the build output to include more useful
information at the start: build id, max parallel forks, max scala
threads and max test retries.

Reviewers: Manikumar Reddy <manikumar.reddy@gmail.com>, Sean Li
2022-02-08 11:03:19 -08:00
Dmitriy Fishman 14671e28d7
MINOR: Fix typo in README.md (#11407)
Reviewers: Mickael Maison <mickael.maison@gmail.com>
2021-10-18 10:19:05 +02:00
Ismael Juma 0118330103
KAFKA-13273: Add support for Java 17 (#11296)
Java 17 is at release candidate stage and it will be a LTS release once
it's out (previous LTS release was Java 11).

Details:
* Replace Java 16 with Java 17 in Jenkins and Readme.
* Replace `--illegal-access=permit` (which was removed from Java 17)
   with  `--add-opens` for the packages we require internal access to.
   Filed KAFKA-13275 for updating the tests not to require `--add-opens`
   (where possible).
* Update `release.py` to use JDK8. and JDK 17 (instead of JDK 8 and JDK 15).
* Removed all but one Streams test from `testsToExclude`. The
   Connect test exclusion list remains the same.
* Add notable change to upgrade.html
* Upgrade to Gradle 7.2 as it's required for proper Java 17 support.
* Upgrade mockito to 3.12.4 for better Java 17 support.
* Adjusted `KafkaRaftClientTest` and `QuorumStateTest` not to require
   private access to `jdk.internal.util.random`.

Reviewers: Manikumar Reddy <manikumar.reddy@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>
2021-09-06 08:55:52 -07:00
Manikumar Reddy c807980088
MINOR: Update `./gradlew allDepInsight` example in README (#11125)
Reviewers: Ismael Juma <ismael@juma.me.uk>
2021-07-25 21:05:27 +05:30
Ismael Juma fd66db4793
KAFKA-12930,KAFKA-12929: Deprecate Java 8 and Scala 2.12 (#11059)
Update the readme to note the deprecation. We will also mention the deprecation
in the downloads page when the release is done.

Reviewers: Konstantine Karantasis <konstantine@confluent.io>, David Jacot <djacot@confluent.io>, José Armando García Sancio <jsancio@users.noreply.github.com>
2021-07-15 15:29:18 -07:00
Ismael Juma 855011f92a
MINOR: Upgrade Gradle to 7.1.1 and remove JDK 15 build (#10968)
Gradle 7.1 improves Java incremental compilation:
https://docs.gradle.org/7.1.1/release-notes.html

We previously kept the JDK 15 build because some
tests didn't work with JDK 16. Since then, a number
of PRs were submitted to fix this so it's best
to remove the JDK 15 build before we create the
3.0 release branch.

Finally bump `test-retry` gradle plugin version too.

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>, Luke Chen <showuon@gmail.com>
2021-07-04 10:55:16 -07:00
Ismael Juma 13ffebe2f1
MINOR: Update jacoco to 0.8.7 for JDK 16 support (#10654)
Details:
* https://github.com/jacoco/jacoco/releases/tag/v0.8.6
* https://github.com/jacoco/jacoco/releases/tag/v0.8.7

Ran `./gradlew clients:reportCoverage -PenableTestCoverage=true -Dorg.gradle.parallel=false`
successfully with Java 15 (see https://github.com/gradle/gradle/issues/15730 and
https://github.com/scoverage/gradle-scoverage/issues/150 for the reason why 
`-Dorg.gradle.parallel=false` is required).

Also updated `README.md` to include `-Dorg.gradle.parallel=false` alongside `reportCoverage`.

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2021-05-12 08:13:03 -07:00
Ismael Juma 16b2d4f3a7
MINOR: Self-managed -> KRaft (Kafka Raft) (#10414)
`Self-managed` is also used in the context of Cloud vs on-prem and it can
be confusing.

`KRaft` is a cute combination of `Kafka Raft` and it's pronounced like `craft`
(as in `craftsmanship`).

Reviewers: Colin P. McCabe <cmccabe@apache.org>, Jose Sancio <jsancio@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>, Ron Dagostino <rdagostino@confluent.io>
2021-03-29 15:39:10 -07:00
Ismael Juma 7c7e8078e4
MINOR: Use self-managed mode instead of KIP-500 and nozk (#10362)
KIP-500 is not particularly descriptive. I also tweaked the readme text a bit.

Tested that the readme for self-managed still works after these changes.

Reviewers: Colin P. McCabe <cmccabe@apache.org>, Ron Dagostino <rdagostino@confluent.io>, Jason Gustafson <jason@confluent.io>
2021-03-19 16:42:37 -07:00
Ismael Juma 7a3ebbebbc
KAFKA-12415 Prepare for Gradle 7.0 and restrict transitive scope for non api dependencies (#10203)
Gradle 7.0 is required for Java 16 compatibility and it removes a number of
deprecated APIs. Fix most issues preventing the upgrade to Gradle 7.0.
The remaining ones are more complicated and should be handled
in a separate PR. Details of the changes:

* Release tarball no longer includes includes test, sources, javadoc and test sources jars (these
are still published to the Maven Central repository).
* Replace `compile` with `api` or `implementation` - note that `implementation`
dependencies appear with `runtime` scope in the pom file so this is a (positive)
change in behavior
* Add missing dependencies that were uncovered by the usage of `implementation`
* Replace `testCompile` with `testImplementation`
* Replace `runtime` with `runtimeOnly` and `testRuntime` with `testRuntimeOnly`
* Replace `configurations.runtime` with `configurations.runtimeClasspath`
* Replace `configurations.testRuntime` with `configurations.testRuntimeClasspath` (except for
the usage in the `streams` project as that causes a cyclic dependency error)
* Use `java-library` plugin instead of `java`
* Use `maven-publish` plugin instead of deprecated `maven` plugin - this changes the
commands used to publish and to install locally, but task aliases for `install` and
`uploadArchives` were added for backwards compatibility
* Removed `-x signArchives` line from the readme since it was wrong (it was a
no-op before and it fails now, however)
* Replaces `artifacts` block with an approach that works with the `maven-publish` plugin
* Don't publish `jmh-benchmark` module - the shadow jar is pretty large and not
particularly useful (before this PR, we would publish the non shadow jars)
* Replace `version` with `archiveVersion`, `baseName` with `archiveBaseName` and
`classifier` with `archiveClassifier`
* Update Gradle and plugins to the latest stable version (7.0 is not stable yet)
* Use `plugin` DSL to configure plugins
* Updated notable changes for 3.0

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>, Randall Hauch <rhauch@gmail.com>
2021-03-04 11:22:22 -08:00
Ismael Juma b5265e98eb
KAFKA-12357: Do not inline methods from the scala package by default (#10174)
As mentioned in #9548, users currently use the kafka jar (`core` module)
for integration testing and the current inlining behavior causes
problems when the user's classpath contains a different Scala version
than the one that was used for compilation (e.g. 2.13.4 versus 2.13.3).

An example error:

`java.lang.NoClassDefFoundError: scala/math/Ordering$$anon$7`

We now disable inlining of the `scala` package by default, but make it
easy to enable it for those who so desire (a good option if you can
ensure the scala library version matches the one used for compilation).
While at it, we make it possible to disable scala compiler optimizations
(`none`) or to use only method local optimizations (`method`). This can
be useful if optimizing for compilation time during development.

Verified behavior by running gradlew with `--debug` and checking the
output after `[zinc] The Scala compiler is invoked with:`

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2021-02-22 21:11:17 -08:00
Ismael Juma 8cabd57612
MINOR: Update jmh to 1.27 for async profiler support (#9129)
Also updated the jmh readme to make it easier for new people to know
what's possible and best practices.

There were some changes in the generated benchmarking code that
required adjusting `spotbugs-exclude.xml` and for a `javac` warning
to be suppressed for the benchmarking module. I took the chance
to make the spotbugs exclusion mode maintainable via a regex
pattern.

Tested the commands on Linux and macOS with zsh.

JMH highlights:

* async-profiler integration. Can be used with -prof async,
pass -prof async:help to look for the accepted options.
* perf c2c [2] integration. Can be used with -prof perfc2c,
if available.
* JFR profiler integration. Can be used with -prof jfr, pass
-prof jfr:help to look for the accepted options.

Full details:
* 1.24: https://mail.openjdk.java.net/pipermail/jmh-dev/2020-August/002982.html
* 1.25: https://mail.openjdk.java.net/pipermail/jmh-dev/2020-August/002987.html
* 1.26: https://mail.openjdk.java.net/pipermail/jmh-dev/2020-October/003024.html
* 1.27: https://mail.openjdk.java.net/pipermail/jmh-dev/2020-December/003096.html

Reviewers: Manikumar Reddy <manikumar.reddy@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>, Bill Bejeck <bbejeck@gmail.com>, Lucas Bradstreet <lucasbradstreet@gmail.com>
2020-12-10 17:56:52 -08:00
Ismael Juma aa0cd667bc
MINOR: Replace Java 14 with Java 15 in the README (#9298)
We have been testing with the Java 15 release candidate for a few weeks and
it has now been declared final.

Reviewers: Manikumar Reddy <manikumar.reddy@gmail.com>, David Jacot <djacot@confluent.io>, Lee Dongjin <dongjin@apache.org>
2020-09-21 07:36:42 -07:00
Luke Chen d7f3505a21
MINOR: Update scala default version in readme (#9260)
Now, default should be 2.13.x, not 2.12.x. Update it.

Reviewers: Ismael Juma <ismael@juma.me.uk>
2020-09-08 07:11:43 -07:00
David Arthur 241e1447fa
KAFKA-10444: Configure PR builds via Jenkinsfile (#9238) 2020-09-01 18:12:10 -04:00
showuon 048f45ce91
update the quickstart link in readme (#9158)
Correct the link to newly polished Kafka website.

Reviewers: Boyang Chen <boyang@confluent.io>
2020-08-11 19:23:58 -07:00
John Roesler a44ac3b3cd
MINOR: add task ':streams:testAll' (#9073)
Adds a new task (`:streams:testAll`) to gradle to run all the tests for all Streams sub-projects.

Reviewers: Boyang Chen <boyang@confluent.io>
2020-07-24 15:30:20 -05:00
Ismael Juma 5ecd094b57
MINOR: Reduce build time by gating test coverage plugins behind a flag (#8899)
Most builds don't require test coverage output, so it's wasteful
to spend cycles tracking coverage information for each method
invoked.

I ran a quick test in a fast desktop machine, the absolute
difference will be larger in a slower machine. The tests were
executed after `./gradlew clean` and with a gradle daemon
that was started just before the test (and mildly warmed up
by running `./gradlew clean` again).

`./gradlew unitTest --continue --profile`:
* With coverage enabled: 6m32s
* With coverage disabled: 5m47s

I ran the same test twice and the results were within 2s of
each other, so reasonably consistent.

16% reduction in the time taken to run the unit tests is a
reasonable gain with little downside, so I think this is a
good change.

Reviewers: Manikumar Reddy <manikumar.reddy@gmail.com>
2020-06-19 07:32:53 -07:00
Ismael Juma 1d438033f7
MINOR: Pass `-release 8` to scalac and upgrade to Gradle 6.4 (#8538)
The version of Zinc included with Gradle 6.4 includes a fix for the blocker
that was preventing us from passing `-release 8` to scalac.

Release notes for Gradle 6.4:

https://docs.gradle.org/6.4/release-notes.html

Reviewers: Manikumar Reddy <manikumar.reddy@gmail.com>
2020-05-05 22:20:29 -07:00
Ismael Juma dbe618c63c
KAFKA-9907: Switch default build to Scala 2.13 (#8537)
Scala 2.13.2 introduces support for suppressing warnings,
which makes it possible to enable fatal warnings. This is
useful enough from a development perspective to justify
this change.

In addition, Scala 2.13.2 also has a Vector implementation
with significant performance improvements and encoding
of String matches to switches.

Reviewers: Manikumar Reddy <manikumar.reddy@gmail.com>
2020-04-23 07:02:54 -07:00
Ismael Juma d6da0452b6
MINOR: Update to Gradle 6.3 (#7677)
* Introduce `gradlewAll` script to replace `*All` tasks since the approach
used by the latter doesn't work since Gradle 6.0 and it's unclear when,
if ever, it will work again ( see https://github.com/gradle/gradle/issues/11301).
* Update release script and README given the above.
* Update zinc to 1.3.5.
* Update gradle-versions-plugin to 0.28.0.

The major improvements in Gradle 6.0 to 6.3 are:
- Improved incremental compilation for Scala
- Support for Java 14 (although some Gradle plugins
like spotBugs may need to be updated or disabled,
will do that separately)
- Improved scalac reporting, warnings are clearly
marked as such, which is very helpful.

Tested `gradlewAll` manually for the commands listed in the README
and release script. For `uploadArchive`, I tested it with a local Maven
repository.

Reviewers: Manikumar Reddy <manikumar.reddy@gmail.com>
2020-04-19 19:24:21 -07:00
Boyang Chen 1263576b60
MINOR: add process(Test)Messages to the README (#8480) 2020-04-15 16:29:35 -04:00
Viktor Somogyi 987f0eeb31
KAFKA-8164: Add support for retrying failed (#8019)
Disabled by default, but enabled for Jenkins PR builds (maximum of 1 retry per
test with up to 5 retries for the test run).

Reviewers: Ismael Juma <ismael@juma.me.uk>
2020-02-05 16:41:28 -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
Bryan Ji 29ccbed2c2 MINOR: Fix small typo in main README (#7779)
Fixed a small typo in the main README file ("They are also are printed" --> "They are also printed").

Reviewers: Manikumar Reddy <manikumar.reddy@gmail.com>
2019-12-18 20:49:17 +05:30
Grant Henke 09f700ab3e KAFKA-1714: Fix gradle wrapper bootstrapping (#6031)
Given we need to follow the Apache rule of not checking
any binaries into the source code, Kafka has always had
a bit of a tricky Gradle bootstrap.
Using ./gradlew as users expect doesn’t work and a
local and compatible version of Gradle was required to
generate the wrapper first.

This patch changes the behavior of the wrapper task to
instead generate a gradlew script that can bootstrap the
jar itself. Additionally it adds a license, removes the bat
script, and handles retries.

The documentation in the readme was also updated.

Going forward patches that upgrade gradle should run
`gradle wrapper` before checking in the change.

With this change users using ./gradlew can be sure they
are always building with the correct version of Gradle.

Reviewers: Viktor Somogyi <viktorsomogyi@gmail.com>, Ismael Juma <ismael@juma.me.uk
2019-11-21 08:06:06 -08:00
Arvind Thirunarayanan 255fcdc236 MINOR: add dependency analysis debugging tasks
Author: Arvind Thirunarayanan <athirunar@confluent.io>

Reviewers: Colin Patrick McCabe <colin@cmccabe.xyz>

Closes #7694 from arvindth/ath-debugdeps-task
2019-11-16 14:38:35 +05:30
Dejan Stojadinović 5339d2dfd2 KAFKA-7197: Support Scala 2.13 (#5454)
- include Scala 2.13 in gradle build
- handle future milestone and RC versions of Scala in a better way
- if no Scala version is specified, default to scala 2.12 (bump from 2.11)
- include certain Xlint options (removed by Scala 2.13) for Scala 2.11/2.12 build only
- upgrade versions for dependencies: 
  - scalaLogging: 3.9.0 -->> 3.9.2
  - scalatest:        3.0.7 -->> 3.0.8
  - scoverage:       1.3.1 -->> 1.4.0

Reviewers: Ewen Cheslack-Postava <me@ewencp.org>, Ismael Juma <ismael@juma.me.uk>
2019-06-22 09:26:14 -07:00
Stanislav Kozlovski 9e60f4cd17 MINOR: Add system tests README link from main README (#6939) 2019-06-14 18:51:37 +05:30
Ismael Juma 7d9e93ac6d
MINOR: Use https instead of http in links (#6477)
Verified that the https links work.

I didn't update the license header in this PR since that touches
so many files. Will file a separate one for that.

Reviewers: Manikumar Reddy <manikumar.reddy@gmail.com>
2019-04-22 11:58:25 -07:00
Attila Sasvari 09c4a3e87d MINOR: Update README.md with Gradle 5+ requirement (#6039) 2018-12-17 16:30:14 -08:00
Colin Hicks 4a0fd4c41b MINOR: Bump Gradle version to 5.0 (#5964)
Gradle 5.0 was released on 26 November. See the release notes for enhancements and fixes: https://docs.gradle.org/5.0/release-notes.html.

A notable bugfix ensures that Javadoc artifacts are cleaned between builds.

The upgraded wrapper was spot-checked against the commands in the README and the
README was updated not to use removed system property `-Dtest.single`.

Reviewers: Ismael Juma <ismael@juma.me.uk>
2018-11-29 16:04:39 -08:00