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.
@ -4,9 +4,9 @@ See our [web site](http://kafka.apache.org) for details on the project.
@@ -4,9 +4,9 @@ See our [web site](http://kafka.apache.org) for details on the project.
You need to have [Gradle](http://www.gradle.org/installation) and [Java](http://www.oracle.com/technetwork/java/javase/downloads/index.html) installed.
Kafka requires Gradle 3.0 or higher.
Kafka requires Gradle 4.5 or higher.
Java 7 should be used for building in order to support both Java 7 and Java 8 at runtime.
Java 8 should be used for building in order to support both Java 8 and Java 10 at runtime.
### First bootstrap and download the wrapper ###
cd kafka_source_dir
@ -85,8 +85,6 @@ You can pass either the major version (eg 2.11) or the full version (eg 2.11.12)
@@ -85,8 +85,6 @@ You can pass either the major version (eg 2.11) or the full version (eg 2.11.12)
From a security perspective, we recommend you use the latest released version of JDK 1.8 as older freely available versions have disclosed security vulnerabilities.
LinkedIn is currently running JDK 1.8 u5 (looking to upgrade to a newer version) with the G1 collector. If you decide to use the G1 collector (the current default) and you are still on JDK 1.7, make sure you are on u51 or newer. LinkedIn tried out u21 in testing, but they had a number of problems with the GC implementation in that version.
LinkedIn's tuning looks like this:
LinkedIn is currently running JDK 1.8 u5 (looking to upgrade to a newer version) with the G1 collector. LinkedIn's tuning looks like this:
<h5><aid="upgrade_200_notable"href="#upgrade_200_notable">Notable changes in 2.0.0</a></h5>
<ul>
<li><ahref="https://cwiki.apache.org/confluence/x/oYtjB">KIP-186</a> increases the default offset retention time from 1 day to 7 days. This makes it less likely to "lose" offsets in an application that commits infrequently. It also increases the active set of offsets and therefore can increase memory usage on the broker. Note that the console consumer currently enables offset commit by default and can be the source of a large number of offsets which this change will now preserve for 7 days instead of 1. You can preserve the existing behavior by setting the broker config <code>offsets.retention.minutes</code> to 1440.</li>
<li>Support for Java 7 has been dropped, Java 8 is now the minimum version required.</li>
<li><ahref="https://issues.apache.org/jira/browse/KAFKA-5674">KAFKA-5674</a> extends the lower interval of <code>max.connections.per.ip minimum</code> to zero and therefore allows IP-based filtering of inbound connections.</li>
added API version tag to the metric <code>kafka.network:type=RequestMetrics,name=RequestsPerSec,request={Produce|FetchConsumer|FetchFollower|...}</code>.
@ -497,9 +494,9 @@ with open(os.path.expanduser("~/.gradle/gradle.properties")) as f:
@@ -497,9 +494,9 @@ with open(os.path.expanduser("~/.gradle/gradle.properties")) as f:
contents=f.read()
ifnotuser_ok("Going to build and upload mvn artifacts based on these settings:\n"+contents+'\nOK (y/n)?: '):
fail("Retry again later")
cmd("Building and uploading archives","./gradlew uploadArchivesAll",cwd=kafka_dir,env=jdk7_env)
cmd("Building and uploading archives","./gradlew uploadArchivesAll",cwd=kafka_dir,env=jdk8_env)
cmd("Building and uploading archives","./gradlew uploadCoreArchives_2_12 -PscalaVersion=2.12",cwd=kafka_dir,env=jdk8_env)
cmd("Building and uploading archives","mvn deploy -Pgpg-signing",cwd=streams_quickstart_dir,env=jdk7_env)
cmd("Building and uploading archives","mvn deploy -Pgpg-signing",cwd=streams_quickstart_dir,env=jdk8_env)