From 169f6aa3c169296ba4ba5d7cb27a78b4f7ab7aea Mon Sep 17 00:00:00 2001 From: Gonzalo Ortiz Date: Tue, 13 Jan 2026 19:28:52 +0100 Subject: [PATCH] first java 21 commit --- .../build-multi-arch-pinot-docker-image.yml | 4 +- .../build-pinot-base-docker-image.yml | 2 +- .../workflows/pinot_compatibility_tests.yml | 4 +- ...stage_query_engine_compatibility_tests.yml | 4 +- .github/workflows/pinot_tests.yml | 33 +++++++++----- pinot-clients/pinot-java-client/pom.xml | 1 + pinot-clients/pinot-jdbc-client/pom.xml | 1 + pinot-common/pom.xml | 2 + .../pinot-flink-connector/pom.xml | 2 + .../pinot-spark-2-connector/pom.xml | 2 + .../pinot-spark-3-connector/pom.xml | 2 + pinot-connectors/pinot-spark-common/pom.xml | 2 + .../helix/ControllerRequestClient.java | 2 + pinot-core/pom.xml | 2 + .../pinot-metrics/pinot-yammer/pom.xml | 1 + pinot-segment-local/pom.xml | 3 ++ pinot-segment-spi/pom.xml | 1 + pinot-server/pom.xml | 8 ++++ pinot-spi/pom.xml | 2 + pinot-timeseries/pinot-timeseries-spi/pom.xml | 1 + pom.xml | 44 ++++++++++++++++++- 21 files changed, 102 insertions(+), 21 deletions(-) diff --git a/.github/workflows/build-multi-arch-pinot-docker-image.yml b/.github/workflows/build-multi-arch-pinot-docker-image.yml index e3314bec9c12..eb82c310a3d9 100644 --- a/.github/workflows/build-multi-arch-pinot-docker-image.yml +++ b/.github/workflows/build-multi-arch-pinot-docker-image.yml @@ -59,7 +59,7 @@ jobs: strategy: matrix: arch: [ "amd64", "arm64" ] - base-image-tag: [ "11-amazoncorretto", "11-ms-openjdk" ] + base-image-tag: [ "21-amazoncorretto", "21-ms-openjdk" ] name: Build Pinot Docker Image on ${{ matrix.arch }} with base image ${{ matrix.base-image-tag }} needs: [ generate-build-info ] steps: @@ -104,5 +104,5 @@ jobs: env: TAGS: "${{needs.generate-build-info.outputs.tags}}" BUILD_PLATFORM: "linux/arm64,linux/amd64" - BASE_IMAGE_TAGS: "11-amazoncorretto,11-ms-openjdk" + BASE_IMAGE_TAGS: "21-amazoncorretto,21-ms-openjdk" run: .github/workflows/scripts/docker/.pinot_multi_arch_docker_image_manifest_package.sh diff --git a/.github/workflows/build-pinot-base-docker-image.yml b/.github/workflows/build-pinot-base-docker-image.yml index e079fde1c304..03fb32d5dd99 100644 --- a/.github/workflows/build-pinot-base-docker-image.yml +++ b/.github/workflows/build-pinot-base-docker-image.yml @@ -46,5 +46,5 @@ jobs: OPEN_JDK_DIST: ${{ matrix.openJdkDist }} BASE_IMAGE_TYPE: ${{ matrix.baseImageType }} BUILD_PLATFORM: "linux/amd64,linux/arm64" - TAG: "11-${{ matrix.openJdkDist }}" + TAG: "21-${{ matrix.openJdkDist }}" run: .github/workflows/scripts/docker/.pinot_base_docker_image_build_and_push.sh diff --git a/.github/workflows/pinot_compatibility_tests.yml b/.github/workflows/pinot_compatibility_tests.yml index a2a2bf9dd16b..285d7c6ecbbb 100644 --- a/.github/workflows/pinot_compatibility_tests.yml +++ b/.github/workflows/pinot_compatibility_tests.yml @@ -37,10 +37,10 @@ jobs: name: Pinot Compatibility Regression Testing against ${{ github.event.inputs.oldCommit }} and ${{ github.event.inputs.newCommit }} on ${{ matrix.test_suite }} steps: - uses: actions/checkout@v4 - - name: Set up JDK 11 + - name: Set up JDK 21 uses: actions/setup-java@v4 with: - java-version: 11 + java-version: 21 distribution: 'temurin' cache: 'maven' - name: Setup node diff --git a/.github/workflows/pinot_multi_stage_query_engine_compatibility_tests.yml b/.github/workflows/pinot_multi_stage_query_engine_compatibility_tests.yml index fc5c337ca054..01f6f5126981 100644 --- a/.github/workflows/pinot_multi_stage_query_engine_compatibility_tests.yml +++ b/.github/workflows/pinot_multi_stage_query_engine_compatibility_tests.yml @@ -37,10 +37,10 @@ jobs: name: Pinot Multi-Stage Query Engine Compatibility Regression Testing against ${{ github.event.inputs.oldCommit }} and ${{ github.event.inputs.newCommit }} on ${{ matrix.test_suite }} steps: - uses: actions/checkout@v4 - - name: Set up JDK 11 + - name: Set up JDK 21 uses: actions/setup-java@v4 with: - java-version: 11 + java-version: 21 distribution: 'temurin' cache: 'maven' - name: Setup node diff --git a/.github/workflows/pinot_tests.yml b/.github/workflows/pinot_tests.yml index ec64fd65915b..fe2758499c8c 100644 --- a/.github/workflows/pinot_tests.yml +++ b/.github/workflows/pinot_tests.yml @@ -50,10 +50,10 @@ jobs: name: Pinot Linter Test Set steps: - uses: actions/checkout@v4 - - name: Set up JDK 11 + - name: Set up JDK 21 uses: actions/setup-java@v4 with: - java-version: 11 + java-version: 21 distribution: 'temurin' cache: 'maven' - name: Install pinot-dependency-verifier into repo @@ -100,10 +100,12 @@ jobs: name: Pinot Binary Compatibility Check steps: - uses: actions/checkout@v4 - - name: Set up JDK 11 + - name: Set up JDK uses: actions/setup-java@v4 with: - java-version: 11 + java-version: | + 11 + 21 distribution: 'temurin' cache: 'maven' # Step that does that actual cache save and restore @@ -178,7 +180,9 @@ jobs: fail-fast: false matrix: testset: [ 1, 2 ] - java: [ 11, 21 ] + java: | + 21 +# 25 # Disable Java 25 tests until we fix the Datasketches compatibility distribution: [ "temurin" ] name: Pinot Unit Test Set ${{ matrix.testset }} (${{matrix.distribution}}-${{matrix.java}}) steps: @@ -186,7 +190,10 @@ jobs: - name: Set up JDK ${{ matrix.java }}-${{ matrix.distribution }} uses: actions/setup-java@v4 with: - java-version: ${{ matrix.java }} + java-version: | + 11 + 21 + 25 distribution: ${{ matrix.distribution }} cache: 'maven' # Step that does that actual cache save and restore @@ -323,7 +330,9 @@ jobs: - name: Set up JDK ${{ matrix.java }}-${{ matrix.distribution }} uses: actions/setup-java@v4 with: - java-version: ${{ matrix.java }} + java-version: | + 11 + ${{ matrix.java }} distribution: ${{ matrix.distribution }} cache: 'maven' # Step that does that actual cache save and restore @@ -489,10 +498,10 @@ jobs: name: Pinot Compatibility Regression Testing against ${{ matrix.old_commit }} on ${{ matrix.test_suite }} steps: - uses: actions/checkout@v4 - - name: Set up JDK 11 + - name: Set up JDK 21 uses: actions/setup-java@v4 with: - java-version: 11 + java-version: 21 distribution: 'temurin' cache: 'maven' - name: Setup node @@ -554,10 +563,10 @@ jobs: name: Pinot Multi-Stage Query Engine Compatibility Regression Testing against ${{ matrix.old_commit }} on ${{ matrix.test_suite }} steps: - uses: actions/checkout@v4 - - name: Set up JDK 11 + - name: Set up JDK 21 uses: actions/setup-java@v4 with: - java-version: 11 + java-version: 21 distribution: 'temurin' cache: 'maven' - name: Setup node @@ -612,7 +621,7 @@ jobs: # Changed to false in order to improve coverage using unsafe buffers fail-fast: false matrix: - java: [ 11, 21 ] + java: [ 21, 25 ] distribution: [ "temurin" ] name: Pinot Quickstart on JDK ${{ matrix.java }}-${{ matrix.distribution }} steps: diff --git a/pinot-clients/pinot-java-client/pom.xml b/pinot-clients/pinot-java-client/pom.xml index af70e7995bc5..ca6519744a24 100644 --- a/pinot-clients/pinot-java-client/pom.xml +++ b/pinot-clients/pinot-java-client/pom.xml @@ -32,6 +32,7 @@ ${basedir}/../.. package + 11 diff --git a/pinot-clients/pinot-jdbc-client/pom.xml b/pinot-clients/pinot-jdbc-client/pom.xml index 66449fbc8122..4c4c56a78f14 100644 --- a/pinot-clients/pinot-jdbc-client/pom.xml +++ b/pinot-clients/pinot-jdbc-client/pom.xml @@ -31,6 +31,7 @@ https://pinot.apache.org/ ${basedir}/../.. + 11 diff --git a/pinot-common/pom.xml b/pinot-common/pom.xml index e7dda3066f9c..428673a71e2a 100644 --- a/pinot-common/pom.xml +++ b/pinot-common/pom.xml @@ -32,6 +32,8 @@ ${basedir}/.. /usr/local/bin/thrift + 11 + 11 diff --git a/pinot-connectors/pinot-flink-connector/pom.xml b/pinot-connectors/pinot-flink-connector/pom.xml index a42377029746..3e5923bd3947 100644 --- a/pinot-connectors/pinot-flink-connector/pom.xml +++ b/pinot-connectors/pinot-flink-connector/pom.xml @@ -31,6 +31,8 @@ https://pinot.apache.org/ ${basedir}/../.. + 11 + 11 diff --git a/pinot-connectors/pinot-spark-2-connector/pom.xml b/pinot-connectors/pinot-spark-2-connector/pom.xml index b9638b6c87ee..f9d0aaef8456 100644 --- a/pinot-connectors/pinot-spark-2-connector/pom.xml +++ b/pinot-connectors/pinot-spark-2-connector/pom.xml @@ -32,6 +32,8 @@ ${basedir}/../.. org.apache.pinot.\$internal + 11 + 11 diff --git a/pinot-connectors/pinot-spark-3-connector/pom.xml b/pinot-connectors/pinot-spark-3-connector/pom.xml index b626e6aa48d9..97cbb6b6cae7 100644 --- a/pinot-connectors/pinot-spark-3-connector/pom.xml +++ b/pinot-connectors/pinot-spark-3-connector/pom.xml @@ -32,6 +32,8 @@ ${basedir}/../.. org.apache.pinot.\$internal + 11 + 11 diff --git a/pinot-connectors/pinot-spark-common/pom.xml b/pinot-connectors/pinot-spark-common/pom.xml index 8f9ecba2a59f..883d9277f198 100644 --- a/pinot-connectors/pinot-spark-common/pom.xml +++ b/pinot-connectors/pinot-spark-common/pom.xml @@ -31,6 +31,8 @@ https://pinot.apache.org/ ${basedir}/../.. + 11 + 11 diff --git a/pinot-controller/src/main/java/org/apache/pinot/controller/helix/ControllerRequestClient.java b/pinot-controller/src/main/java/org/apache/pinot/controller/helix/ControllerRequestClient.java index 0b2ce9fd3c7b..9ce485adb54c 100644 --- a/pinot-controller/src/main/java/org/apache/pinot/controller/helix/ControllerRequestClient.java +++ b/pinot-controller/src/main/java/org/apache/pinot/controller/helix/ControllerRequestClient.java @@ -49,6 +49,8 @@ * *

It should be provided with a specified {@link ControllerRequestURLBuilder} for constructing the URL requests * as well as a reusable {@link HttpClient} during construction. + * + * TODO: This should be moved to an external project in order to allow clients to use JDKs older than 21 */ public class ControllerRequestClient { private final HttpClient _httpClient; diff --git a/pinot-core/pom.xml b/pinot-core/pom.xml index bf729dd618db..4d08d43bab7c 100644 --- a/pinot-core/pom.xml +++ b/pinot-core/pom.xml @@ -31,6 +31,8 @@ https://pinot.apache.org/ ${basedir}/.. + 11 + 21 diff --git a/pinot-plugins/pinot-metrics/pinot-yammer/pom.xml b/pinot-plugins/pinot-metrics/pinot-yammer/pom.xml index 069a2ffba7d8..0329dc3eb35d 100644 --- a/pinot-plugins/pinot-metrics/pinot-yammer/pom.xml +++ b/pinot-plugins/pinot-metrics/pinot-yammer/pom.xml @@ -33,6 +33,7 @@ ${basedir}/../../.. package + 11 diff --git a/pinot-segment-local/pom.xml b/pinot-segment-local/pom.xml index ab428b8633a5..cc461e61f35a 100644 --- a/pinot-segment-local/pom.xml +++ b/pinot-segment-local/pom.xml @@ -32,6 +32,9 @@ https://pinot.apache.org/ ${basedir}/.. + 11 + + 21 diff --git a/pinot-segment-spi/pom.xml b/pinot-segment-spi/pom.xml index bc7ae661da63..22837ed2d57e 100644 --- a/pinot-segment-spi/pom.xml +++ b/pinot-segment-spi/pom.xml @@ -32,6 +32,7 @@ https://pinot.apache.org/ ${basedir}/.. + 11 diff --git a/pinot-server/pom.xml b/pinot-server/pom.xml index 09d2acc0755a..8fe9bceb31fb 100644 --- a/pinot-server/pom.xml +++ b/pinot-server/pom.xml @@ -112,6 +112,14 @@ lib + + org.apache.maven.plugins + maven-compiler-plugin + + 17 + 17 + + diff --git a/pinot-spi/pom.xml b/pinot-spi/pom.xml index 48a85550b08c..b636afb5a439 100644 --- a/pinot-spi/pom.xml +++ b/pinot-spi/pom.xml @@ -31,6 +31,8 @@ https://pinot.apache.org/ ${basedir}/.. + 11 + 11 diff --git a/pinot-timeseries/pinot-timeseries-spi/pom.xml b/pinot-timeseries/pinot-timeseries-spi/pom.xml index e565f4209d73..8b5f14bed335 100644 --- a/pinot-timeseries/pinot-timeseries-spi/pom.xml +++ b/pinot-timeseries/pinot-timeseries-spi/pom.xml @@ -33,6 +33,7 @@ ${basedir}/../.. + 11 diff --git a/pom.xml b/pom.xml index 4419e91ed40c..fc878eb6ff10 100644 --- a/pom.xml +++ b/pom.xml @@ -110,7 +110,22 @@ ${basedir} dev - 11 + + 21 + 21 UTF-8 @@ -2297,6 +2312,9 @@ -Xshare:off -XX:+EnableDynamicAgentLoading + + ${jdk.test.version} + @@ -2402,7 +2420,7 @@ ${jdk.version} ${jdk.version} ${jdk.version} - true + ${project.build.sourceEncoding} @@ -2426,6 +2444,25 @@ + + org.apache.maven.plugins + maven-toolchains-plugin + 1.1 + + + + toolchain + + + + + + + ${jdk.version} + + + + org.codehaus.mojo javacc-maven-plugin @@ -2590,6 +2627,9 @@ 1 false + + ${jdk.test.version} +