This is an automated email from the ASF dual-hosted git repository.
jtuglu1 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/druid.git
The following commit(s) were added to refs/heads/master by this push:
new 704baa25471 feat: upgrade to JDK 25 compiler (#19707)
704baa25471 is described below
commit 704baa25471012b2544fd57d70f662bafa8d175f
Author: jtuglu1 <[email protected]>
AuthorDate: Tue Jul 21 11:08:01 2026 -0700
feat: upgrade to JDK 25 compiler (#19707)
Upgrade to JDK 25 compiler for Druid v39 release per
https://lists.apache.org/thread/vmszj1qfr1gkqy3bfqm7n4qdxp0hy390.
---
.github/workflows/ci.yml | 2 +-
.github/workflows/codeql.yml | 2 +-
.github/workflows/cron-job-its.yml | 2 +-
.github/workflows/docker-tests.yml | 2 +-
.github/workflows/static-checks.yml | 2 +-
README.md | 2 +-
README.template | 2 +-
dev/intellij-setup.md | 4 +--
distribution/docker/Dockerfile | 6 ++--
docs/operations/java.md | 2 +-
docs/tutorials/cluster.md | 2 +-
docs/tutorials/index.md | 2 +-
examples/bin/verify-java | 8 ++---
pom.xml | 6 ++--
.../java/util/common/CompressionUtilsTest.java | 41 ++--------------------
15 files changed, 25 insertions(+), 60 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 81b032387c6..333f6b6fe85 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -24,7 +24,7 @@ jobs:
strategy:
fail-fast: false
matrix:
- jdk: [ "21", "25" ]
+ jdk: [ "25" ]
pattern: [ "C*", "N*", "D*,H*,L*", "I*,A*,U*", "K*,E*,W*,Z*,Y*,X*",
"M*,P*,O*", "R*,B*,Q*,V*", "S*", "T*,F*,G*,J*" ]
uses: ./.github/workflows/worker.yml
with:
diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
index 3fbbae12ba7..fbd99333956 100644
--- a/.github/workflows/codeql.yml
+++ b/.github/workflows/codeql.yml
@@ -44,7 +44,7 @@ jobs:
- uses: actions/setup-java@v5
with:
distribution: 'zulu'
- java-version: '21'
+ java-version: '25'
cache: 'maven'
# Initializes the CodeQL tools for scanning.
diff --git a/.github/workflows/cron-job-its.yml
b/.github/workflows/cron-job-its.yml
index 834691d4e6b..15c6f7634df 100644
--- a/.github/workflows/cron-job-its.yml
+++ b/.github/workflows/cron-job-its.yml
@@ -41,7 +41,7 @@ jobs:
- name: setup java
uses: actions/setup-java@v5
with:
- java-version: '21'
+ java-version: '25'
distribution: 'zulu'
cache: maven
diff --git a/.github/workflows/docker-tests.yml
b/.github/workflows/docker-tests.yml
index 3cba272ce8b..52fac44f1a2 100644
--- a/.github/workflows/docker-tests.yml
+++ b/.github/workflows/docker-tests.yml
@@ -44,7 +44,7 @@ jobs:
uses: actions/setup-java@v5
with:
distribution: 'zulu'
- java-version: 21
+ java-version: 25
cache: 'maven'
- name: Run Docker tests
id: run-it
diff --git a/.github/workflows/static-checks.yml
b/.github/workflows/static-checks.yml
index 297448b30ff..c8dddd98a0b 100644
--- a/.github/workflows/static-checks.yml
+++ b/.github/workflows/static-checks.yml
@@ -35,7 +35,7 @@ jobs:
strategy:
fail-fast: false
matrix:
- jdk: [ '21', '25' ]
+ jdk: [ '25' ]
uses: ./.github/workflows/worker.yml
with:
script: .github/scripts/packaging-check.sh
diff --git a/README.md b/README.md
index dc30ea17a60..2bd2428e445 100644
--- a/README.md
+++ b/README.md
@@ -102,7 +102,7 @@ Find articles written by community members and a calendar
of upcoming events on
### Building from source
-Please note that JDK 21 or JDK 25 is required to build Druid.
+Please note that JDK 25 is required to build Druid.
See the latest [build
guide](https://druid.apache.org/docs/latest/development/build.html) for
instructions on building Apache Druid from source.
diff --git a/README.template b/README.template
index 175397b3f76..342c0d31c69 100644
--- a/README.template
+++ b/README.template
@@ -32,7 +32,7 @@ Build from Source
You can build Apache Druid directly from source.
Prerequisites:
- JDK 21 or JDK 25
+ JDK 25
Maven version 3.x
diff --git a/dev/intellij-setup.md b/dev/intellij-setup.md
index d1cbd7174bc..e3ee4e718d2 100644
--- a/dev/intellij-setup.md
+++ b/dev/intellij-setup.md
@@ -23,9 +23,9 @@ setups of Druid.
## Project SDK
-Druid requires JDK 21 or JDK 25. Add a supported JDK using
+Druid requires JDK 25. Add a supported JDK using
`File` -> `Project Structure...` -> `Platform Settings` -> `SDKs`. The SDK
name can reflect the JDK distribution and
-version, such as `zulu-21`.
+version, such as `zulu-25`.

diff --git a/distribution/docker/Dockerfile b/distribution/docker/Dockerfile
index a6698ba54f3..d7777e3c7c1 100644
--- a/distribution/docker/Dockerfile
+++ b/distribution/docker/Dockerfile
@@ -17,13 +17,13 @@
# under the License.
#
-ARG JDK_VERSION=21
+ARG JDK_VERSION=25
# The platform is explicitly specified as x64 to build the Druid distribution.
# This is because it's not able to build the distribution on arm64 due to
dependency problem of web-console. See:
https://github.com/apache/druid/issues/13012
# Since only java jars are shipped in the final image, it's OK to build the
distribution on x64.
# Once the web-console dependency problem is resolved, we can remove the
--platform directive.
-FROM --platform=linux/amd64 maven:3.9 as builder
+FROM --platform=linux/amd64 maven:3.9-eclipse-temurin-25 as builder
# Rebuild from source in this stage
# This can be unset if the tarball was already built outside of Docker
@@ -68,7 +68,7 @@ RUN if [ "$TARGETARCH" = "arm64" ]; then \
FROM busybox:1.35.0-glibc as busybox
-FROM gcr.io/distroless/java$JDK_VERSION-debian12
+FROM gcr.io/distroless/java$JDK_VERSION-debian13
LABEL maintainer="Apache Druid Developers <[email protected]>"
COPY --from=busybox /bin/busybox /busybox/busybox
diff --git a/docs/operations/java.md b/docs/operations/java.md
index e55a9291fe1..ef71281c2dc 100644
--- a/docs/operations/java.md
+++ b/docs/operations/java.md
@@ -27,7 +27,7 @@ a Java runtime for Druid.
## Selecting a Java runtime
-Druid officially supports Java 21 and 25.
+Druid officially supports Java 25.
The project team recommends using an OpenJDK-based Java distribution. There
are many free and actively-supported
distributions available, including
diff --git a/docs/tutorials/cluster.md b/docs/tutorials/cluster.md
index 700f3a8141e..eaf59d82b7a 100644
--- a/docs/tutorials/cluster.md
+++ b/docs/tutorials/cluster.md
@@ -133,7 +133,7 @@ The [basic cluster tuning
guide](../operations/basic-cluster-tuning.md) has info
We recommend running your favorite Linux distribution. You will also need
-* [Java 17](../operations/java.md)
+* [Java 25](../operations/java.md)
* Python 3
:::info
diff --git a/docs/tutorials/index.md b/docs/tutorials/index.md
index bebb16faccd..f50e2e3cb90 100644
--- a/docs/tutorials/index.md
+++ b/docs/tutorials/index.md
@@ -40,7 +40,7 @@ You can follow these steps on a relatively modest machine,
such as a workstation
The software requirements for the installation machine are:
* Linux, Mac OS X, or other Unix-like OS. (Windows is not supported)
-* [Java 17](../operations/java.md)
+* [Java 25](../operations/java.md)
* Python 3
* Perl 5
diff --git a/examples/bin/verify-java b/examples/bin/verify-java
index 0ffab8b96c1..65070cc354b 100755
--- a/examples/bin/verify-java
+++ b/examples/bin/verify-java
@@ -28,20 +28,20 @@ sub fail_check {
: "No Java runtime was detected on your system.";
print STDERR <<"EOT";
-Druid requires Java 17 or 21. $current_version_text
+Druid requires Java 25. $current_version_text
If you believe this check is in error, or you want to proceed with a
potentially
unsupported Java runtime, you can skip this check using an environment
variable:
export DRUID_SKIP_JAVA_CHECK=1
-Otherwise, install Java 17 or 21 in one of the following locations.
+Otherwise, install Java 25 in one of the following locations.
* DRUID_JAVA_HOME
* JAVA_HOME
* java (installed on PATH)
-Other versions of Java versions may work, but are not officially supported.
+Other Java versions may work, but are not officially supported.
For more information about selecting a Java runtime visit:
https://druid.apache.org/docs/latest/operations/java.html
@@ -68,6 +68,6 @@ if ($?) {
}
# If we know it won't work, die. Otherwise hope for the best.
-if ($java_version =~ /version \"((\d+)\.(\d+).*?)\"/ && $2 != 17 && $2 != 21) {
+if ($java_version =~ /version \"((\d+)\.(\d+).*?)\"/ && $2 != 25) {
fail_check($1);
}
diff --git a/pom.xml b/pom.xml
index 53b68843c0a..4b7afa3f404 100644
--- a/pom.xml
+++ b/pom.xml
@@ -70,7 +70,7 @@
</scm>
<properties>
- <java.version>21</java.version>
+ <java.version>25</java.version>
<maven.compiler.release>${java.version}</maven.compiler.release>
<project.build.resourceEncoding>UTF-8</project.build.resourceEncoding>
<aether.version>0.9.0.M2</aether.version>
@@ -1761,7 +1761,7 @@
<plugin>
<groupId>de.thetaphi</groupId>
<artifactId>forbiddenapis</artifactId>
- <version>3.9</version>
+ <version>3.10</version>
<configuration>
<ignoreSignaturesOfMissingClasses>true</ignoreSignaturesOfMissingClasses>
<bundledSignatures>
@@ -2078,7 +2078,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
- <version>3.8.1</version>
+ <version>3.11.0</version>
<configuration>
<ignoredNonTestScopedDependencies>
<ignoredNonTestScopedDependency>*</ignoredNonTestScopedDependency>
diff --git
a/processing/src/test/java/org/apache/druid/java/util/common/CompressionUtilsTest.java
b/processing/src/test/java/org/apache/druid/java/util/common/CompressionUtilsTest.java
index 6d1c41e4ee5..937c51458d9 100644
---
a/processing/src/test/java/org/apache/druid/java/util/common/CompressionUtilsTest.java
+++
b/processing/src/test/java/org/apache/druid/java/util/common/CompressionUtilsTest.java
@@ -34,7 +34,6 @@ import
org.apache.commons.compress.compressors.zstandard.ZstdCompressorOutputStr
import org.apache.druid.utils.CompressionUtils;
import org.junit.Assert;
import org.junit.Before;
-import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
@@ -592,41 +591,8 @@ public class CompressionUtilsTest
}
}
- // If this ever passes, er... fails to fail... then the bug is fixed
- // http://bugs.java.com/bugdatabase/view_bug.do?bug_id=7036144
- @Test(expected = AssertionError.class)
- @Ignore("This test fails in JDK 21, looks like the bug was fixed in 21.0.9
at least.")
- public void testGunzipBug() throws IOException
- {
- final ByteArrayOutputStream tripleGzByteStream = new
ByteArrayOutputStream(GZ_BYTES.length * 3);
- tripleGzByteStream.write(GZ_BYTES);
- tripleGzByteStream.write(GZ_BYTES);
- tripleGzByteStream.write(GZ_BYTES);
- try (final InputStream inputStream = new GZIPInputStream(
- new ZeroRemainingInputStream(
- new ByteArrayInputStream(
- tripleGzByteStream.toByteArray()
- )
- )
- )) {
- try (final ByteArrayOutputStream outputStream = new
ByteArrayOutputStream(EXPECTED.length * 3)) {
- Assert.assertEquals(
- "Read terminated too soon (bug 7036144)",
- EXPECTED.length * 3,
- ByteStreams.copy(inputStream, outputStream)
- );
- final byte[] found = outputStream.toByteArray();
- Assert.assertEquals(EXPECTED.length * 3, found.length);
- Assert.assertArrayEquals(EXPECTED, Arrays.copyOfRange(found,
EXPECTED.length * 0, EXPECTED.length * 1));
- Assert.assertArrayEquals(EXPECTED, Arrays.copyOfRange(found,
EXPECTED.length * 1, EXPECTED.length * 2));
- Assert.assertArrayEquals(EXPECTED, Arrays.copyOfRange(found,
EXPECTED.length * 2, EXPECTED.length * 3));
- }
- }
- }
-
@Test
- // http://bugs.java.com/bugdatabase/view_bug.do?bug_id=7036144
- public void testGunzipBugworkarround() throws IOException
+ public void testGunzipConcatenatedByteSource() throws IOException
{
testFile.delete();
Assert.assertFalse(testFile.exists());
@@ -650,7 +616,7 @@ public class CompressionUtilsTest
try (final InputStream inputStream = new FileInputStream(testFile)) {
try (final ByteArrayOutputStream outputStream = new
ByteArrayOutputStream(EXPECTED.length * 3)) {
Assert.assertEquals(
- "Read terminated too soon (7036144)",
+ "Read terminated too soon",
EXPECTED.length * 3,
ByteStreams.copy(inputStream, outputStream)
);
@@ -664,8 +630,7 @@ public class CompressionUtilsTest
}
@Test
- // http://bugs.java.com/bugdatabase/view_bug.do?bug_id=7036144
- public void testGunzipBugStreamWorkarround() throws IOException
+ public void testGunzipConcatenatedStream() throws IOException
{
final ByteArrayOutputStream tripleGzByteStream = new
ByteArrayOutputStream(GZ_BYTES.length * 3);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]