Skip to content

Commit 050e1e2

Browse files
authored
ci: add Spark 4.0 / JDK 21 profile (apache#4060)
1 parent dc5929a commit 050e1e2

3 files changed

Lines changed: 20 additions & 3 deletions

File tree

.github/workflows/pr_build_linux.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ jobs:
8181
container:
8282
image: amd64/rust
8383
env:
84-
JAVA_TOOL_OPTIONS: ${{ matrix.profile.java_version == '17' && '--add-exports=java.base/sun.nio.ch=ALL-UNNAMED --add-exports=java.base/sun.util.calendar=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED' || '' }}
84+
JAVA_TOOL_OPTIONS: ${{ (matrix.profile.java_version == '17' || matrix.profile.java_version == '21') && '--add-exports=java.base/sun.nio.ch=ALL-UNNAMED --add-exports=java.base/sun.util.calendar=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED' || '' }}
8585
strategy:
8686
matrix:
8787
profile:
@@ -94,6 +94,9 @@ jobs:
9494
- name: "Spark 4.0, JDK 17"
9595
java_version: "17"
9696
maven_opts: "-Pspark-4.0"
97+
- name: "Spark 4.0, JDK 21"
98+
java_version: "21"
99+
maven_opts: "-Pspark-4.0"
97100
# Spark 4.1 is intentionally absent: the lint job invokes -Psemanticdb,
98101
# but semanticdb-scalac_2.13.17 is not yet published, so we cannot
99102
# currently run scalafix against the spark-4.1 profile.
@@ -293,6 +296,11 @@ jobs:
293296
maven_opts: "-Pspark-4.0"
294297
scan_impl: "auto"
295298

299+
- name: "Spark 4.0, JDK 21"
300+
java_version: "21"
301+
maven_opts: "-Pspark-4.0"
302+
scan_impl: "auto"
303+
296304
- name: "Spark 4.1, JDK 17"
297305
java_version: "17"
298306
maven_opts: "-Pspark-4.1"
@@ -388,7 +396,7 @@ jobs:
388396
container:
389397
image: amd64/rust
390398
env:
391-
JAVA_TOOL_OPTIONS: ${{ matrix.profile.java_version == '17' && '--add-exports=java.base/sun.nio.ch=ALL-UNNAMED --add-exports=java.base/sun.util.calendar=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED' || '' }}
399+
JAVA_TOOL_OPTIONS: ${{ (matrix.profile.java_version == '17' || matrix.profile.java_version == '21') && '--add-exports=java.base/sun.nio.ch=ALL-UNNAMED --add-exports=java.base/sun.util.calendar=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED' || '' }}
392400

393401
steps:
394402
- uses: runs-on/action@742bf56072eb4845a0f94b3394673e4903c90ff0 # v2.1.0

.github/workflows/spark_sql_test.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ jobs:
141141
- {spark-short: '3.4', spark-full: '3.4.3', java: 11, scan-impl: 'auto'}
142142
- {spark-short: '3.5', spark-full: '3.5.8', java: 11, scan-impl: 'auto'}
143143
- {spark-short: '4.0', spark-full: '4.0.2', java: 17, scan-impl: 'auto'}
144+
- {spark-short: '4.0', spark-full: '4.0.2', java: 21, scan-impl: 'auto'}
144145
fail-fast: false
145146
name: spark-sql-${{ matrix.config.scan-impl }}-${{ matrix.module.name }}/spark-${{ matrix.config.spark-full }}
146147
runs-on: ${{ matrix.os }}
@@ -175,6 +176,14 @@ jobs:
175176
fi
176177
env:
177178
LC_ALL: "C.UTF-8"
179+
# Mirror Spark's own JDK 21 / 25 CI workaround. apache/spark's
180+
# build_java21.yml and build_java25.yml set this same env var to
181+
# process-isolate the V1/V2 Parquet and Orc source suites because
182+
# they exhibit cross-suite resource interactions (file-stream and
183+
# thread leaks) under the newer JDKs. project/SparkBuild.scala
184+
# reads DEDICATED_JVM_SBT_TESTS and forks a separate JVM per
185+
# listed suite. Empty value is a safe no-op.
186+
DEDICATED_JVM_SBT_TESTS: ${{ matrix.config.spark-short == '4.0' && 'org.apache.spark.sql.execution.datasources.parquet.ParquetFileFormatV1Suite,org.apache.spark.sql.execution.datasources.parquet.ParquetFileFormatV2Suite,org.apache.spark.sql.execution.datasources.orc.OrcSourceV1Suite,org.apache.spark.sql.execution.datasources.orc.OrcSourceV2Suite' || '' }}
178187
- name: Upload fallback log
179188
if: ${{ github.event.inputs.collect-fallback-logs == 'true' }}
180189
uses: actions/upload-artifact@v7

docs/source/user-guide/latest/installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Other versions may work well enough for development and evaluation purposes.
4343
| ------------- | ------------ | ------------- | ----------------- | --------------------- |
4444
| 3.4.3 | 11/17 | 2.12/2.13 | Yes | Yes |
4545
| 3.5.8 | 11/17 | 2.12/2.13 | Yes | Yes |
46-
| 4.0.2 | 17 | 2.13 | Yes | Yes |
46+
| 4.0.2 | 17/21 | 2.13 | Yes | Yes |
4747

4848
Note that we do not test the full matrix of supported Java and Scala versions in CI for every Spark version.
4949

0 commit comments

Comments
 (0)