Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/delta-conversion-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/flink-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/hive-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/java-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/kafka-connect-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/spark-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
2 changes: 1 addition & 1 deletion baseline.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
17 changes: 6 additions & 11 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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 {
Expand Down Expand Up @@ -203,7 +200,7 @@ subprojects {

tasks.withType(JavaCompile.class).configureEach {
options.encoding = "UTF-8"
options.release = 11
options.release = 17
}

javadoc {
Expand Down Expand Up @@ -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")
}
}
}
Expand Down Expand Up @@ -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()
}
Expand Down
4 changes: 2 additions & 2 deletions jmh.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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(",")
Expand Down
2 changes: 1 addition & 1 deletion site/docs/contribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
9 changes: 0 additions & 9 deletions spark/v4.0/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,13 @@
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}"),
project(":iceberg-spark:iceberg-spark-runtime-${sparkMajorVersion}_${scalaVersion}"),
]

configure(sparkProjects) {
tasks.configureEach {
onlyIf { javaVersionSupported }
}
configurations {
all {
resolutionStrategy {
Expand Down