From 4079d7a67b88f6312e50b40af64780ceea6c75ef Mon Sep 17 00:00:00 2001 From: yangjie01 Date: Wed, 20 Sep 2023 11:27:14 +0800 Subject: [PATCH 01/14] init --- .github/workflows/benchmark.yml | 4 +- .github/workflows/build_and_test.yml | 18 +++---- .github/workflows/build_ansi.yml | 4 +- .github/workflows/build_coverage.yml | 4 +- .github/workflows/build_java11.yml | 49 ------------------- .../workflows/build_rockdb_as_ui_backend.yml | 4 +- .github/workflows/build_scala213.yml | 4 +- .github/workflows/publish_snapshot.yml | 7 +-- docs/building-spark.md | 2 +- docs/index.md | 5 +- pom.xml | 6 +-- 11 files changed, 27 insertions(+), 80 deletions(-) delete mode 100644 .github/workflows/build_java11.yml diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 9e5b0f424838a..43c6e39e15cce 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -27,9 +27,9 @@ on: required: true default: '*' jdk: - description: 'JDK version: 8, 11, 17 or 21-ea' + description: 'JDK version: 17 or 21-ea' required: true - default: '8' + default: '17' scala: description: 'Scala version: 2.12 or 2.13' required: true diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index e18c54562f006..7104a29108940 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -25,7 +25,7 @@ on: java: required: false type: string - default: 8 + default: 17 branch: description: Branch to run the build against required: false @@ -650,11 +650,11 @@ jobs: if [ -f ./dev/free_disk_space_container ]; then ./dev/free_disk_space_container fi - - name: Install Java 8 + - name: Install Java 17 uses: actions/setup-java@v3 with: distribution: temurin - java-version: 8 + java-version: 17 - name: License test run: ./dev/check-license - name: Dependencies test @@ -865,11 +865,11 @@ jobs: key: scala-213-coursier-${{ hashFiles('**/pom.xml', '**/plugins.sbt') }} restore-keys: | scala-213-coursier- - - name: Install Java 8 + - name: Install Java 17 uses: actions/setup-java@v3 with: distribution: temurin - java-version: 8 + java-version: 17 - name: Build with SBT run: | ./dev/change-scala-version.sh 2.13 @@ -916,11 +916,11 @@ jobs: key: tpcds-coursier-${{ hashFiles('**/pom.xml', '**/plugins.sbt') }} restore-keys: | tpcds-coursier- - - name: Install Java 8 + - name: Install Java 17 uses: actions/setup-java@v3 with: distribution: temurin - java-version: 8 + java-version: 17 - name: Cache TPC-DS generated data id: cache-tpcds-sf-1 uses: actions/cache@v3 @@ -1022,11 +1022,11 @@ jobs: key: docker-integration-coursier-${{ hashFiles('**/pom.xml', '**/plugins.sbt') }} restore-keys: | docker-integration-coursier- - - name: Install Java 8 + - name: Install Java 17 uses: actions/setup-java@v3 with: distribution: temurin - java-version: 8 + java-version: 17 - name: Run tests run: | ./dev/run-tests --parallelism 1 --modules docker-integration-tests --included-tags org.apache.spark.tags.DockerTest diff --git a/.github/workflows/build_ansi.yml b/.github/workflows/build_ansi.yml index e67a9262fcd70..57dcbe299332d 100644 --- a/.github/workflows/build_ansi.yml +++ b/.github/workflows/build_ansi.yml @@ -17,7 +17,7 @@ # under the License. # -name: "Build / ANSI (master, Hadoop 3, JDK 8, Scala 2.12)" +name: "Build / ANSI (master, Hadoop 3, JDK 17, Scala 2.12)" on: schedule: @@ -31,7 +31,7 @@ jobs: uses: ./.github/workflows/build_and_test.yml if: github.repository == 'apache/spark' with: - java: 8 + java: 17 branch: master hadoop: hadoop3 envs: >- diff --git a/.github/workflows/build_coverage.yml b/.github/workflows/build_coverage.yml index aa210f0031866..b534aaef32555 100644 --- a/.github/workflows/build_coverage.yml +++ b/.github/workflows/build_coverage.yml @@ -17,7 +17,7 @@ # under the License. # -name: "Build / Coverage (master, Scala 2.12, Hadoop 3, JDK 8)" +name: "Build / Coverage (master, Scala 2.12, Hadoop 17, JDK 8)" on: schedule: @@ -31,7 +31,7 @@ jobs: uses: ./.github/workflows/build_and_test.yml if: github.repository == 'apache/spark' with: - java: 8 + java: 17 branch: master hadoop: hadoop3 envs: >- diff --git a/.github/workflows/build_java11.yml b/.github/workflows/build_java11.yml deleted file mode 100644 index bf7b2edb45ff3..0000000000000 --- a/.github/workflows/build_java11.yml +++ /dev/null @@ -1,49 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# - -name: "Build (master, Scala 2.12, Hadoop 3, JDK 11)" - -on: - schedule: - - cron: '0 16 * * *' - -jobs: - run-build: - permissions: - packages: write - name: Run - uses: ./.github/workflows/build_and_test.yml - if: github.repository == 'apache/spark' - with: - java: 11 - branch: master - hadoop: hadoop3 - envs: >- - { - "SKIP_MIMA": "true", - "SKIP_UNIDOC": "true" - } - jobs: >- - { - "build": "true", - "pyspark": "true", - "sparkr": "true", - "tpcds-1g": "true", - "docker-integration-tests": "true" - } diff --git a/.github/workflows/build_rockdb_as_ui_backend.yml b/.github/workflows/build_rockdb_as_ui_backend.yml index 04e0e7c2e1073..bd3fc95d9f081 100644 --- a/.github/workflows/build_rockdb_as_ui_backend.yml +++ b/.github/workflows/build_rockdb_as_ui_backend.yml @@ -17,7 +17,7 @@ # under the License. # -name: "Build / RocksDB as UI Backend (master, Hadoop 3, JDK 8, Scala 2.12)" +name: "Build / RocksDB as UI Backend (master, Hadoop 3, JDK 17, Scala 2.12)" on: schedule: @@ -31,7 +31,7 @@ jobs: uses: ./.github/workflows/build_and_test.yml if: github.repository == 'apache/spark' with: - java: 8 + java: 17 branch: master hadoop: hadoop3 envs: >- diff --git a/.github/workflows/build_scala213.yml b/.github/workflows/build_scala213.yml index cae0981ee1e8a..c4bc6339dab94 100644 --- a/.github/workflows/build_scala213.yml +++ b/.github/workflows/build_scala213.yml @@ -17,7 +17,7 @@ # under the License. # -name: "Build (master, Scala 2.13, Hadoop 3, JDK 8)" +name: "Build (master, Scala 2.13, Hadoop 3, JDK 17)" on: schedule: @@ -31,7 +31,7 @@ jobs: uses: ./.github/workflows/build_and_test.yml if: github.repository == 'apache/spark' with: - java: 8 + java: 17 branch: master hadoop: hadoop3 envs: >- diff --git a/.github/workflows/publish_snapshot.yml b/.github/workflows/publish_snapshot.yml index 9bdb52e4e92da..458c69889fcff 100644 --- a/.github/workflows/publish_snapshot.yml +++ b/.github/workflows/publish_snapshot.yml @@ -32,9 +32,6 @@ jobs: matrix: branch: - master - - branch-3.5 - - branch-3.4 - - branch-3.3 steps: - name: Checkout Spark repository uses: actions/checkout@v3 @@ -47,11 +44,11 @@ jobs: key: snapshot-maven-${{ hashFiles('**/pom.xml') }} restore-keys: | snapshot-maven- - - name: Install Java 8 + - name: Install Java 17 uses: actions/setup-java@v3 with: distribution: temurin - java-version: 8 + java-version: 17 - name: Publish snapshot env: ASF_USERNAME: ${{ secrets.NEXUS_USER }} diff --git a/docs/building-spark.md b/docs/building-spark.md index bbbc51d8c22c9..8f026adbe2037 100644 --- a/docs/building-spark.md +++ b/docs/building-spark.md @@ -27,7 +27,7 @@ license: | ## Apache Maven The Maven-based build is the build of reference for Apache Spark. -Building Spark using Maven requires Maven 3.9.4 and Java 8/11/17. +Building Spark using Maven requires Maven 3.9.4 and Java 17. Spark requires Scala 2.12/2.13; support for Scala 2.11 was removed in Spark 3.0.0. ### Setting up Maven's Memory Usage diff --git a/docs/index.md b/docs/index.md index bd77fd75a0b3b..d65ae1f7abe50 100644 --- a/docs/index.md +++ b/docs/index.md @@ -34,12 +34,11 @@ source, visit [Building Spark](building-spark.html). Spark runs on both Windows and UNIX-like systems (e.g. Linux, Mac OS), and it should run on any platform that runs a supported version of Java. This should include JVMs on x86_64 and ARM64. It's easy to run locally on one machine --- all you need is to have `java` installed on your system `PATH`, or the `JAVA_HOME` environment variable pointing to a Java installation. -Spark runs on Java 8/11/17, Scala 2.12/2.13, Python 3.8+, and R 3.5+. -Java 8 prior to version 8u371 support is deprecated as of Spark 3.5.0. +Spark runs on Java 17, Scala 2.12/2.13, Python 3.8+, and R 3.5+. When using the Scala API, it is necessary for applications to use the same version of Scala that Spark was compiled for. For example, when using Scala 2.13, use Spark compiled for 2.13, and compile code/applications for Scala 2.13 as well. -For Java 11, setting `-Dio.netty.tryReflectionSetAccessible=true` is required for the Apache Arrow library. This prevents the `java.lang.UnsupportedOperationException: sun.misc.Unsafe or java.nio.DirectByteBuffer.(long, int) not available` error when Apache Arrow uses Netty internally. +For Java 17, setting `-Dio.netty.tryReflectionSetAccessible=true` is required for the Apache Arrow library. This prevents the `java.lang.UnsupportedOperationException: sun.misc.Unsafe or java.nio.DirectByteBuffer.(long, int) not available` error when Apache Arrow uses Netty internally. # Running the Examples and Shell diff --git a/pom.xml b/pom.xml index 971cb07ea40ea..bff3e2a3c0da9 100644 --- a/pom.xml +++ b/pom.xml @@ -112,7 +112,7 @@ UTF-8 UTF-8 - 1.8 + 17 ${java.version} ${java.version} 3.9.4 @@ -2933,7 +2933,7 @@ -deprecation -feature -explaintypes - -target:jvm-1.8 + -target:17 -Xfatal-warnings -Ywarn-unused:imports -P:silencer:globalFilters=.*deprecated.* @@ -3645,7 +3645,7 @@ -deprecation -feature -explaintypes - -target:jvm-1.8 + -target:17 -Wconf:cat=deprecation:wv,any:e -Wunused:imports