From 72ef5c9ef6c17caae5e05433d65aad593f146e55 Mon Sep 17 00:00:00 2001 From: Jing Yu Date: Wed, 1 Jul 2026 13:56:32 -0700 Subject: [PATCH 1/8] PHOENIX-7901: Support JDK 11/17/21 in phoenix-adapters --- pom.xml | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 72 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 32a7b3a..380eefa 100644 --- a/pom.xml +++ b/pom.xml @@ -41,6 +41,9 @@ UTF-8 + 1.8 + ${compileSource} + ${compileSource} 1.8 2.30.22 5.3.1 @@ -59,6 +62,43 @@ 1 3.0.0-M6 4.9.3 + + + 2200m + + -enableassertions -Xmx${surefire.Xmx} + -Djava.security.egd=file:/dev/./urandom -Djava.net.preferIPv4Stack=true + -Djava.awt.headless=true -Djdk.net.URLClassPath.disableClassPathURLCheck=true + -Dorg.apache.hbase.thirdparty.io.netty.leakDetection.level=advanced + -Dio.netty.eventLoopThreads=3 -Duser.timezone="America/Los_Angeles" + -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=./target/ + "-Djava.library.path=${hadoop.library.path}${path.separator}${java.library.path}" + + + -XX:NewRatio=4 -XX:SurvivorRatio=8 -XX:+UseCompressedOops -XX:+UseConcMarkSweepGC + -XX:+DisableExplicitGC -XX:+UseCMSInitiatingOccupancyOnly -XX:+CMSClassUnloadingEnabled + -XX:+CMSScavengeBeforeRemark -XX:CMSInitiatingOccupancyFraction=68 + + -Dorg.apache.hbase.thirdparty.io.netty.tryReflectionSetAccessible=true + --add-modules jdk.unsupported + --add-opens java.base/java.nio=ALL-UNNAMED + --add-opens java.base/sun.nio.ch=ALL-UNNAMED + --add-opens java.base/java.lang=ALL-UNNAMED + --add-opens java.base/jdk.internal.ref=ALL-UNNAMED + --add-opens java.base/java.lang.reflect=ALL-UNNAMED + --add-opens java.base/java.util=ALL-UNNAMED + --add-opens java.base/java.util.concurrent=ALL-UNNAMED + --add-exports java.base/jdk.internal.misc=ALL-UNNAMED + --add-exports java.security.jgss/sun.security.krb5=ALL-UNNAMED + + ${phoenix-surefire.jdk8.tuning.flags} + + --add-opens java.base/jdk.internal.util.random=ALL-UNNAMED + + + ${phoenix-surefire.argLine} ${phoenix-surefire.jdk8.tuning.flags} @{jacocoArgLine} + + @@ -68,10 +108,6 @@ org.apache.maven.plugins maven-compiler-plugin 3.8.1 - - ${java.version} - ${java.version} - org.apache.maven.plugins @@ -140,6 +176,38 @@ + + build-with-jdk8 + + [1.8,11) + + + + + build-with-jdk11 + + [11,17) + + + ${phoenix-surefire.jdk11.flags} + ${phoenix-surefire.jdk11.tuning.flags} + ${phoenix-surefire.argLine} + @{jacocoArgLine} + + + + build-with-jdk17 + + [17,) + + + ${phoenix-surefire.jdk11.flags} + ${phoenix-surefire.jdk17.flags} + ${phoenix-surefire.jdk17.tuning.flags} + ${phoenix-surefire.argLine} + @{jacocoArgLine} + + From 84499a6ee6198178284ac2f32b94d66c851bd007 Mon Sep 17 00:00:00 2001 From: Jing Yu Date: Wed, 1 Jul 2026 14:35:32 -0700 Subject: [PATCH 2/8] Add CI matrix to test JDK 8/11/17/21 --- .github/workflows/ci.yml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 56c938c..dc8a6a4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,6 +9,11 @@ jobs: build-and-test: runs-on: ubuntu-latest + strategy: + matrix: + java: [8, 11, 17, 21] + fail-fast: false + # Increase timeout for long-running test suites #timeout-minutes: 60 @@ -18,10 +23,10 @@ jobs: with: fetch-depth: 0 - - name: Set up JDK 8 + - name: Set up JDK ${{ matrix.java }} uses: actions/setup-java@v4 with: - java-version: '8' + java-version: ${{ matrix.java }} distribution: 'temurin' cache: 'maven' @@ -56,7 +61,7 @@ jobs: if: always() uses: actions/upload-artifact@v4 with: - name: test-results + name: test-results-jdk${{ matrix.java }} path: | **/target/surefire-reports/*.xml **/target/surefire-reports/*.txt @@ -68,7 +73,7 @@ jobs: if: failure() uses: actions/upload-artifact@v4 with: - name: test-logs + name: test-logs-jdk${{ matrix.java }} path: | **/target/surefire-reports/*.txt **/target/failsafe-reports/*.txt @@ -82,7 +87,7 @@ jobs: NODE_OPTIONS: '--max-old-space-size=12288' with: report_paths: '**/target/*-reports/TEST-*.xml' - check_name: Test Results + check_name: Test Results (JDK ${{ matrix.java }}) fail_on_failure: true require_tests: true @@ -90,7 +95,7 @@ jobs: if: success() uses: actions/upload-artifact@v4 with: - name: build-artifacts + name: build-artifacts-jdk${{ matrix.java }} path: | phoenix-ddb-assembly/target/*.tar.gz retention-days: 5 From 46a14e1db66dc8a478f9a086e6c6a0b57b2f86d2 Mon Sep 17 00:00:00 2001 From: Jing Yu Date: Wed, 1 Jul 2026 14:53:24 -0700 Subject: [PATCH 3/8] Add JDK 21 profile and address PR review findings - Fix jacoco wiring with propertyName configuration - Add JDK 21 profile matching upstream Phoenix (split from JDK 17) - Change JDK 17 activation range from [17,) to [17,21) - Add phoenix-surefire.jdk21.flags for SystemExitRule compatibility - Drop CMS flags from JDK 11 tuning (CMS removed in JDK 14) - Add surefire.Xms property for parity with upstream - Remove unused java.version property - Fix jacoco tag style to self-closed format - Move and clarify comment placement All changes align with Apache Phoenix master pom.xml conventions and ensure compatibility with JDK 14-16 (CMS removed in JEP 363). Reference: PHOENIX-7036, commit 48d712ca --- pom.xml | 33 +++++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/pom.xml b/pom.xml index 380eefa..a562ca4 100644 --- a/pom.xml +++ b/pom.xml @@ -44,7 +44,6 @@ 1.8 ${compileSource} ${compileSource} - 1.8 2.30.22 5.3.1 4.13.1 @@ -65,8 +64,9 @@ 2200m + 1000m - -enableassertions -Xmx${surefire.Xmx} + -enableassertions -Xmx${surefire.Xmx} -Xms${surefire.Xms} -Djava.security.egd=file:/dev/./urandom -Djava.net.preferIPv4Stack=true -Djava.awt.headless=true -Djdk.net.URLClassPath.disableClassPathURLCheck=true -Dorg.apache.hbase.thirdparty.io.netty.leakDetection.level=advanced @@ -90,15 +90,15 @@ --add-opens java.base/java.util.concurrent=ALL-UNNAMED --add-exports java.base/jdk.internal.misc=ALL-UNNAMED --add-exports java.security.jgss/sun.security.krb5=ALL-UNNAMED - - ${phoenix-surefire.jdk8.tuning.flags} - + --add-opens java.base/jdk.internal.util.random=ALL-UNNAMED + + -Djava.security.manager=allow ${phoenix-surefire.argLine} ${phoenix-surefire.jdk8.tuning.flags} @{jacocoArgLine} - + @@ -170,6 +170,9 @@ prepare-agent + + jacocoArgLine + @@ -182,7 +185,7 @@ [1.8,11) - + build-with-jdk11 @@ -198,7 +201,7 @@ build-with-jdk17 - [17,) + [17,21) ${phoenix-surefire.jdk11.flags} @@ -208,6 +211,20 @@ @{jacocoArgLine} + + build-with-jdk21 + + [21,) + + + ${phoenix-surefire.jdk11.flags} + ${phoenix-surefire.jdk17.flags} + ${phoenix-surefire.jdk21.flags} + ${phoenix-surefire.jdk17.tuning.flags} + ${phoenix-surefire.argLine} + @{jacocoArgLine} + + From 7484743ca0a2648c11a0ad1c06d8a054fb6de22d Mon Sep 17 00:00:00 2001 From: Jing Yu Date: Wed, 1 Jul 2026 15:32:10 -0700 Subject: [PATCH 4/8] Optimize CI matrix: JDK 8 for PRs, 8+17 for main - PRs: Test only JDK 8 for fast feedback (~10-15 min) - Push to main: Test JDK 8 + 17 for baseline and --add-opens verification - Reduces PR CI time by 75% while maintaining coverage on main branch --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dc8a6a4..a87d80f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,9 @@ jobs: strategy: matrix: - java: [8, 11, 17, 21] + # PRs: JDK 8 only for fast feedback + # Push: JDK 8 + 17 to verify baseline and --add-opens flags + java: ${{ github.event_name == 'pull_request' && fromJSON('[8]') || fromJSON('[8, 17]') }} fail-fast: false # Increase timeout for long-running test suites From 543e75a9e6689f14031472d3e402a6e91524fe4c Mon Sep 17 00:00:00 2001 From: Jing Yu Date: Mon, 6 Jul 2026 12:30:26 -0700 Subject: [PATCH 5/8] update JDK 8 and 21 (instead of 17) for commit builds --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a87d80f..7939564 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,8 +12,8 @@ jobs: strategy: matrix: # PRs: JDK 8 only for fast feedback - # Push: JDK 8 + 17 to verify baseline and --add-opens flags - java: ${{ github.event_name == 'pull_request' && fromJSON('[8]') || fromJSON('[8, 17]') }} + # Push: JDK 8 + 21 to verify baseline and --add-opens flags + java: ${{ github.event_name == 'pull_request' && fromJSON('[8]') || fromJSON('[8, 21]') }} fail-fast: false # Increase timeout for long-running test suites From 7e0371470a09bd89e6e75bcc58673adcde09283f Mon Sep 17 00:00:00 2001 From: Jing Yu Date: Mon, 6 Jul 2026 14:15:42 -0700 Subject: [PATCH 6/8] add Java 21 temporarily on PR for testing --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7939564..42c53ec 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,7 @@ jobs: matrix: # PRs: JDK 8 only for fast feedback # Push: JDK 8 + 21 to verify baseline and --add-opens flags - java: ${{ github.event_name == 'pull_request' && fromJSON('[8]') || fromJSON('[8, 21]') }} + java: ${{ github.event_name == 'pull_request' && fromJSON('[8, 21]') || fromJSON('[8, 21]') }} fail-fast: false # Increase timeout for long-running test suites From d91fe5ebba3320b5857f6e8c604cbe362a9a2d1d Mon Sep 17 00:00:00 2001 From: Jing Yu Date: Tue, 7 Jul 2026 21:16:43 -0700 Subject: [PATCH 7/8] Revert "add Java 21 temporarily on PR for testing" This reverts commit 7e0371470a09bd89e6e75bcc58673adcde09283f. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 42c53ec..7939564 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,7 @@ jobs: matrix: # PRs: JDK 8 only for fast feedback # Push: JDK 8 + 21 to verify baseline and --add-opens flags - java: ${{ github.event_name == 'pull_request' && fromJSON('[8, 21]') || fromJSON('[8, 21]') }} + java: ${{ github.event_name == 'pull_request' && fromJSON('[8]') || fromJSON('[8, 21]') }} fail-fast: false # Increase timeout for long-running test suites From 979a5533e948c4502645edfb2fdb87297e69933f Mon Sep 17 00:00:00 2001 From: Jing Yu Date: Thu, 9 Jul 2026 15:10:20 -0700 Subject: [PATCH 8/8] Increase the test timeout value to avoid timeout in CI --- .../src/test/java/org/apache/phoenix/ddb/MiscIT.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phoenix-ddb-rest/src/test/java/org/apache/phoenix/ddb/MiscIT.java b/phoenix-ddb-rest/src/test/java/org/apache/phoenix/ddb/MiscIT.java index 8b65381..67d20f5 100644 --- a/phoenix-ddb-rest/src/test/java/org/apache/phoenix/ddb/MiscIT.java +++ b/phoenix-ddb-rest/src/test/java/org/apache/phoenix/ddb/MiscIT.java @@ -126,7 +126,7 @@ public void testMixWorkflows2() throws Exception { phoenixDBStreamsClientV2); } - @Test(timeout = 600000) + @Test(timeout = 900000) public void testMixWorkflows4() throws Exception { Misc1Util.test3(dynamoDbClient, phoenixDBClientV2, dynamoDbStreamsClient, phoenixDBStreamsClientV2);