chore: drop support for JDK 11 - #5897
Merged
Merged
Conversation
Require JDK 17 or later to build Comet. The Spark 3.4 and 3.5 profiles now target Java 17, the jdk11 and jdk17 profiles are removed, and a Maven enforcer rule rejects older JDKs. CI jobs that ran Spark 3.4 on JDK 11 move to JDK 17, and the user and contributor docs are updated. Closes apache#4844. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
sunchao
approved these changes
Sep 13, 2026
rich7420
approved these changes
Sep 13, 2026
rich7420
left a comment
Contributor
There was a problem hiding this comment.
@manuzhang thanks for the patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Closes #4844.
Rationale for this change
JDK 11 support was deprecated in 1.0.0 (#4857), with removal scheduled for 1.1.0.
Spark 3.4 and 3.5 themselves still run on JDK 11, as noted on #4844. However, Comet's published artifacts already require JDK 17:
dev/release/build-release-comet.shrefuses to build on anything older than JDK 17.jdk17profile is declared after the Spark profiles, so it overrode theirjava.version=11.comet-spark-spark3.4_2.12andcomet-spark-spark3.5_2.12jars contain 610 Comet classes with class-file major version 61 (Java 17), includingNativeBaseandCometShuffleBlockIterator. Those jars cannot load on JDK 11 today.JDK 11 only worked when building Comet from source on JDK 11 for Spark 3.x. This PR makes the JDK 17 requirement explicit and drops the JDK 11 CI coverage.
What changes are included in this PR?
Build
pom.xml: the defaultjava.versionand thespark-3.4/spark-3.5profiles now target 17. Thejdk11andjdk17profiles are removed; with 17 as the default,jdk17would be a no-op. Passing-Pjdk17now only logs Maven's "profile does not exist" warning.require-java-17enforcer execution fails thevalidatephase on older JDKs withComet requires JDK 17 or later to build., rather than a later compiler error.CI
ci.yml: Preflight (RAT check) uses JDK 17. The Spark 3.4 Spark SQL tests and Iceberg 1.8 (Spark 3.4.3) run on JDK 17.pr_build_linux.yml: the Spark 3.4 lint and test profiles move to JDK 17.JAVA_TOOL_OPTIONSis no longer conditional, since every profile is now JDK 17 or 21. The job names change fromSpark 3.4, JDK 11, Scala 2.12toSpark 3.4, JDK 17, Scala 2.12. Nothing in.asf.yamlordev/cirefers to the old names, because merges are gated on theRequired Checksaggregator.Docs
installation.mdandcompatibility/spark-versions.md: Spark 3.4 and 3.5 are listed with Java 17. The JDK 11 deprecation warning is replaced by a statement that JDK 17 or later is required. The Spark 3.4 deprecation warning is unchanged.iceberg-spark-tests.md: all Iceberg jobs now run on Java 17.development.md: the-Pjdk17guidance is removed.benchmarking_micro_ec2.md: theClass java.lang.Record not foundtroubleshooting entry, which only happened on JDK < 17, is replaced by the new enforcer message.Not changed
kubernetes.mdstill references anapache/datafusion-comet:...-java11image tag. No workflow in this repo publishes Comet Docker images anymore, so I did not switch it to a tag that may not exist.#5885 edits the same Spark 3.4 warning lines in
installation.mdandspark-versions.md, so whichever PR lands second will need a small rebase.How are these changes tested?
./mvnw help:effective-pomon JDK 21:maven.compiler.sourceandmaven.compiler.targetare both 17 with no profile,-Pspark-3.4,-Pspark-3.5and-Pspark-4.0../mvnw -N validateon JDK 21: therequire-java-17rule passes. I did not check the failure path on JDK 11, because no JDK 11 was available locally../mvnw -Pspark-3.4 -Pscala-2.12 -pl common,spark -am -DskipTests test-compileon JDK 21 succeeds, and the enforcer rule runs in each module.dev/ci/check-ci-config.py,actionlintandprettier --checkpass on the changed files.Running Spark 3.4 on JDK 17 in the Spark SQL and Iceberg 1.8 jobs is only exercised in the merge queue or with the
run-spark-3.4-tests/run-iceberg-testslabels. It would be good to add those labels to this PR.🤖 Generated with Claude Code