diff --git a/.github/workflows/delta-conversion-ci.yml b/.github/workflows/delta-conversion-ci.yml index e8da8d33bafc..3c4bbbf4a361 100644 --- a/.github/workflows/delta-conversion-ci.yml +++ b/.github/workflows/delta-conversion-ci.yml @@ -71,7 +71,7 @@ jobs: runs-on: ubuntu-24.04 strategy: matrix: - jvm: [11, 17, 21] + jvm: [17, 21] env: SPARK_LOCAL_IP: localhost steps: @@ -100,7 +100,7 @@ jobs: runs-on: ubuntu-24.04 strategy: matrix: - jvm: [11, 17, 21] + jvm: [17, 21] env: SPARK_LOCAL_IP: localhost steps: diff --git a/.github/workflows/flink-ci.yml b/.github/workflows/flink-ci.yml index 365744ef906f..05898400d3e6 100644 --- a/.github/workflows/flink-ci.yml +++ b/.github/workflows/flink-ci.yml @@ -73,7 +73,7 @@ jobs: runs-on: ubuntu-24.04 strategy: matrix: - jvm: [11, 17, 21] + jvm: [17, 21] flink: ['1.20', '2.0', '2.1'] env: SPARK_LOCAL_IP: localhost diff --git a/.github/workflows/hive-ci.yml b/.github/workflows/hive-ci.yml index a01697664cc9..a48695bbf2fa 100644 --- a/.github/workflows/hive-ci.yml +++ b/.github/workflows/hive-ci.yml @@ -72,7 +72,7 @@ jobs: runs-on: ubuntu-24.04 strategy: matrix: - jvm: [11, 17, 21] + jvm: [17, 21] env: SPARK_LOCAL_IP: localhost steps: diff --git a/.github/workflows/java-ci.yml b/.github/workflows/java-ci.yml index 6e25a1745f0c..61d2d32c0e1e 100644 --- a/.github/workflows/java-ci.yml +++ b/.github/workflows/java-ci.yml @@ -67,7 +67,7 @@ jobs: runs-on: ubuntu-24.04 strategy: matrix: - jvm: [11, 17, 21] + jvm: [17, 21] env: SPARK_LOCAL_IP: localhost steps: @@ -96,7 +96,7 @@ jobs: runs-on: ubuntu-24.04 strategy: matrix: - jvm: [11, 17, 21] + jvm: [17, 21] steps: - uses: actions/checkout@v4 - uses: actions/setup-java@v5 @@ -109,7 +109,7 @@ jobs: runs-on: ubuntu-24.04 strategy: matrix: - jvm: [11, 17, 21] + jvm: [17, 21] steps: - uses: actions/checkout@v4 - uses: actions/setup-java@v5 diff --git a/.github/workflows/kafka-connect-ci.yml b/.github/workflows/kafka-connect-ci.yml index 72a55dfd991b..c67e0f23e218 100644 --- a/.github/workflows/kafka-connect-ci.yml +++ b/.github/workflows/kafka-connect-ci.yml @@ -72,7 +72,7 @@ jobs: runs-on: ubuntu-24.04 strategy: matrix: - jvm: [11, 17, 21] + jvm: [17, 21] env: SPARK_LOCAL_IP: localhost steps: diff --git a/.github/workflows/spark-ci.yml b/.github/workflows/spark-ci.yml index 66193515efb7..8c2a7c2f6fdd 100644 --- a/.github/workflows/spark-ci.yml +++ b/.github/workflows/spark-ci.yml @@ -71,14 +71,12 @@ jobs: runs-on: ubuntu-24.04 strategy: matrix: - jvm: [11, 17, 21] + jvm: [17, 21] spark: ['3.4', '3.5', '4.0'] scala: ['2.12', '2.13'] exclude: # Spark 3.5 is the first version not failing on Java 21 (https://issues.apache.org/jira/browse/SPARK-42369) # Full Java 21 support is coming in Spark 4 (https://issues.apache.org/jira/browse/SPARK-43831) - - jvm: 11 - spark: '4.0' - jvm: 21 spark: '3.4' - spark: '4.0' diff --git a/README.md b/README.md index 582e108b76ea..ea967e077fb2 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,7 @@ Community discussions happen primarily on the [dev mailing list][dev-list] or on ### Building -Iceberg is built using Gradle with Java 11, 17, or 21. +Iceberg is built using Gradle with Java 17 or 21. * To invoke a build and run tests: `./gradlew build` * To skip tests: `./gradlew build -x test -x integrationTest` diff --git a/baseline.gradle b/baseline.gradle index 151fa40a1a28..757db06bdc83 100644 --- a/baseline.gradle +++ b/baseline.gradle @@ -57,7 +57,7 @@ subprojects { java { target 'src/main/java/**/*.java', 'src/test/java/**/*.java', 'src/testFixtures/java/**/*.java', 'src/jmh/java/**/*.java', 'src/integration/java/**/*.java' // 1.23.0 has an issue in formatting comments https://github.com/google/google-java-format/issues/1155 - // so we stick to 1.22.0 to produce consistent result for JDK 11/17/21 + // so we stick to 1.22.0 to produce consistent result for JDK 17/21 googleJavaFormat("1.22.0") removeUnusedImports() licenseHeaderFile "$rootDir/.baseline/copyright/copyright-header-java.txt" diff --git a/build.gradle b/build.gradle index 0f86c629a44b..9961f72fb55f 100644 --- a/build.gradle +++ b/build.gradle @@ -51,10 +51,7 @@ try { project.logger.error(e.getMessage()) } -if (JavaVersion.current() == JavaVersion.VERSION_11) { - project.ext.jdkVersion = '11' - project.ext.extraJvmArgs = [] -} else if (JavaVersion.current() == JavaVersion.VERSION_17 || JavaVersion.current() == JavaVersion.VERSION_21) { +if (JavaVersion.current() == JavaVersion.VERSION_17 || JavaVersion.current() == JavaVersion.VERSION_21) { project.ext.jdkVersion = JavaVersion.current().getMajorVersion().toString() project.ext.extraJvmArgs = ["--add-opens", "java.base/java.io=ALL-UNNAMED", "--add-opens", "java.base/java.lang.invoke=ALL-UNNAMED", @@ -78,7 +75,7 @@ if (JavaVersion.current() == JavaVersion.VERSION_11) { "--add-opens", "java.base/sun.security.action=ALL-UNNAMED", "--add-opens", "java.base/sun.util.calendar=ALL-UNNAMED"] } else { - throw new GradleException("This build must be run with JDK 11 or 17 or 21 but was executed with JDK " + JavaVersion.current()) + throw new GradleException("This build must be run with JDK 17 or 21 but was executed with JDK " + JavaVersion.current()) } tasks.withType(AbstractArchiveTask).configureEach { @@ -203,7 +200,7 @@ subprojects { tasks.withType(JavaCompile.class).configureEach { options.encoding = "UTF-8" - options.release = 11 + options.release = 17 } javadoc { @@ -262,9 +259,9 @@ subprojects { tasks.withType(ScalaCompile.class) { scalaCompileOptions.keepAliveMode.set(KeepAliveMode.DAEMON) // `options.release` doesn't seem to work for ScalaCompile :( - sourceCompatibility = "11" - targetCompatibility = "11" - scalaCompileOptions.additionalParameters.add("-release:11") + sourceCompatibility = "17" + targetCompatibility = "17" + scalaCompileOptions.additionalParameters.add("-release:17") } } } @@ -953,8 +950,6 @@ project(':iceberg-arrow') { } project(':iceberg-nessie') { - // Starting from Nessie 0.104.2, JDK 17+ is required for test dependencies - test.onlyIf { JavaVersion.current() != JavaVersion.VERSION_11 } test { useJUnitPlatform() } diff --git a/jmh.gradle b/jmh.gradle index 57efb3821d8f..20e8608f4897 100644 --- a/jmh.gradle +++ b/jmh.gradle @@ -17,8 +17,8 @@ * under the License. */ -if (jdkVersion != '11' && jdkVersion != '17' && jdkVersion != '21') { - throw new GradleException("The JMH benchmarks must be run with JDK 11 or JDK 17 or JDK 21") +if (jdkVersion != '17' && jdkVersion != '21') { + throw new GradleException("The JMH benchmarks must be run with JDK 17 or JDK 21") } def flinkVersions = (System.getProperty("flinkVersions") != null ? System.getProperty("flinkVersions") : System.getProperty("defaultFlinkVersions")).split(",") diff --git a/site/docs/contribute.md b/site/docs/contribute.md index d38cc28c366c..d99382761ff0 100644 --- a/site/docs/contribute.md +++ b/site/docs/contribute.md @@ -95,7 +95,7 @@ settle disagreements or to force a decision. ## Building the Project Locally -Iceberg is built using Gradle with Java 11, 17, or 21. +Iceberg is built using Gradle with Java 17 or 21. * To invoke a build and run tests: `./gradlew build` * To skip tests: `./gradlew build -x test -x integrationTest` diff --git a/spark/v4.0/build.gradle b/spark/v4.0/build.gradle index 8ebed9bd439b..4c151253f8a6 100644 --- a/spark/v4.0/build.gradle +++ b/spark/v4.0/build.gradle @@ -20,12 +20,6 @@ String sparkMajorVersion = '4.0' String scalaVersion = '2.13' -JavaVersion javaVersion = JavaVersion.current() -Boolean javaVersionSupported = javaVersion == JavaVersion.VERSION_17 || javaVersion == JavaVersion.VERSION_21 -if (!javaVersionSupported) { - logger.warn("Skip Spark 4.0 build which requires JDK 17 or 21 but was executed with JDK " + javaVersion) -} - def sparkProjects = [ project(":iceberg-spark:iceberg-spark-${sparkMajorVersion}_${scalaVersion}"), project(":iceberg-spark:iceberg-spark-extensions-${sparkMajorVersion}_${scalaVersion}"), @@ -33,9 +27,6 @@ def sparkProjects = [ ] configure(sparkProjects) { - tasks.configureEach { - onlyIf { javaVersionSupported } - } configurations { all { resolutionStrategy {