Skip to content

chore: drop support for JDK 11 - #5897

Merged
sunchao merged 1 commit into
apache:mainfrom
manuzhang:drop-jdk11
Sep 13, 2026
Merged

chore: drop support for JDK 11#5897
sunchao merged 1 commit into
apache:mainfrom
manuzhang:drop-jdk11

Conversation

@manuzhang

Copy link
Copy Markdown
Member

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.sh refuses to build on anything older than JDK 17.
  • On JDK 17+, the jdk17 profile is declared after the Spark profiles, so it overrode their java.version=11.
  • As a result, the 1.0.0 comet-spark-spark3.4_2.12 and comet-spark-spark3.5_2.12 jars contain 610 Comet classes with class-file major version 61 (Java 17), including NativeBase and CometShuffleBlockIterator. 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 default java.version and the spark-3.4 / spark-3.5 profiles now target 17. The jdk11 and jdk17 profiles are removed; with 17 as the default, jdk17 would be a no-op. Passing -Pjdk17 now only logs Maven's "profile does not exist" warning.
  • A new require-java-17 enforcer execution fails the validate phase on older JDKs with Comet 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_OPTIONS is no longer conditional, since every profile is now JDK 17 or 21. The job names change from Spark 3.4, JDK 11, Scala 2.12 to Spark 3.4, JDK 17, Scala 2.12. Nothing in .asf.yaml or dev/ci refers to the old names, because merges are gated on the Required Checks aggregator.

Docs

  • installation.md and compatibility/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.
  • Contributor guide:
    • iceberg-spark-tests.md: all Iceberg jobs now run on Java 17.
    • development.md: the -Pjdk17 guidance is removed.
    • benchmarking_micro_ec2.md: the Class java.lang.Record not found troubleshooting entry, which only happened on JDK < 17, is replaced by the new enforcer message.

Not changed

  • kubernetes.md still references an apache/datafusion-comet:...-java11 image tag. No workflow in this repo publishes Comet Docker images anymore, so I did not switch it to a tag that may not exist.
  • The remaining "JDK 11+" mentions describe JFR or JDK behavior, not Comet support.

#5885 edits the same Spark 3.4 warning lines in installation.md and spark-versions.md, so whichever PR lands second will need a small rebase.

How are these changes tested?

  • ./mvnw help:effective-pom on JDK 21: maven.compiler.source and maven.compiler.target are both 17 with no profile, -Pspark-3.4, -Pspark-3.5 and -Pspark-4.0.
  • ./mvnw -N validate on JDK 21: the require-java-17 rule 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-compile on JDK 21 succeeds, and the enforcer rule runs in each module.
  • dev/ci/check-ci-config.py, actionlint and prettier --check pass 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-tests labels. It would be good to add those labels to this PR.

🤖 Generated with Claude Code

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>
@github-actions github-actions Bot added enhancement New feature or request area:Iceberg labels Sep 13, 2026

@andygrove andygrove left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @manuzhang

@rich7420 rich7420 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@manuzhang thanks for the patch

@sunchao
sunchao added this pull request to the merge queue Sep 13, 2026
Merged via the queue into apache:main with commit 481aefe Sep 13, 2026
67 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:Iceberg enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Drop support for JDK 11

4 participants