World's most powerful open data catalog for building a high-performance, geo-distributed and federated metadata lake.
Java ai-catalogdata-catalogdatalakefederated-querylakehousemetadatametalakemodel-catalogopendatacatalogskycomputingstratosphere
[#7823] feat(server): upgrade Gravitino server mini JDK version to 17 (#7913)
Yuhui137abc4c7448
diff --git a/.github/workflows/backend-integration-test.yml b/.github/workflows/backend-integration-test.ymlindex dbbdb0eeb9..1334bf1892 100644--- a/.github/workflows/backend-integration-test.yml+++ b/.github/workflows/backend-integration-test.yml@@ -54,7 +54,7 @@ jobs:strategy:matrix:architecture: [linux/amd64]- java-version: [ 8, 11, 17 ]+ java-version: [ 17 ]backend: [ h2, mysql, postgresql ]test-mode: [ embedded, deploy ]exclude:diff --git a/.github/workflows/build.yml b/.github/workflows/build.ymlindex 12e1336ccb..2a0c68e483 100644--- a/.github/workflows/build.yml+++ b/.github/workflows/build.yml@@ -58,7 +58,7 @@ jobs:- uses: actions/setup-java@v4with:- java-version: 8+ java-version: 17distribution: 'temurin'cache: 'gradle'@@ -76,7 +76,7 @@ jobs:- uses: actions/setup-java@v4with:- java-version: 8+ java-version: 17distribution: 'temurin'cache: 'gradle'@@ -103,7 +103,7 @@ jobs:runs-on: ubuntu-lateststrategy:matrix:- java-version: [ 8, 11, 17 ]+ java-version: [ 17 ]timeout-minutes: 60needs: changesif: needs.changes.outputs.source_changes == 'true'diff --git a/.github/workflows/cron-integration-test.yml b/.github/workflows/cron-integration-test.ymlindex 00750057bb..ddd541d514 100644--- a/.github/workflows/cron-integration-test.yml+++ b/.github/workflows/cron-integration-test.yml@@ -55,7 +55,7 @@ jobs:strategy:matrix:architecture: [linux/amd64]- java-version: [ 8, 11, 17 ]+ java-version: [ 17 ]test-mode: [ embedded, deploy ]env:DOCKER_RUN_NAME: hive-amd64diff --git a/.github/workflows/flink-integration-test.yml b/.github/workflows/flink-integration-test.ymlindex b07e4865b3..ee4749c292 100644--- a/.github/workflows/flink-integration-test.yml+++ b/.github/workflows/flink-integration-test.yml@@ -53,7 +53,7 @@ jobs:strategy:matrix:architecture: [linux/amd64]- java-version: [ 8, 11, 17 ]+ java-version: [ 17 ]uses: ./.github/workflows/flink-integration-test-action.ymlwith:architecture: ${{ matrix.architecture }}diff --git a/.github/workflows/spark-integration-test.yml b/.github/workflows/spark-integration-test.ymlindex 8d93b10756..0d1b53634f 100644--- a/.github/workflows/spark-integration-test.yml+++ b/.github/workflows/spark-integration-test.yml@@ -53,7 +53,7 @@ jobs:matrix:# Integration test for AMD64 architecturearchitecture: [linux/amd64]- java-version: [ 8, 11, 17 ]+ java-version: [ 17 ]scala-version: [ 2.12 ]test-mode: [ embedded, deploy ]uses: ./.github/workflows/spark-integration-test-action.ymldiff --git a/build.gradle.kts b/build.gradle.ktsindex 6f3a334b93..2d49287b37 100644--- a/build.gradle.kts+++ b/build.gradle.kts@@ -286,8 +286,6 @@ subprojects {languageVersion.set(JavaLanguageVersion.of(17))} else {languageVersion.set(JavaLanguageVersion.of(extra["jdkVersion"].toString().toInt()))- sourceCompatibility = JavaVersion.VERSION_1_8- targetCompatibility = JavaVersion.VERSION_1_8}}}diff --git a/catalogs/catalog-fileset/src/test/java/org/apache/gravitino/catalog/fileset/integration/test/HadoopUserAuthenticationIT.java b/catalogs/catalog-fileset/src/test/java/org/apache/gravitino/catalog/fileset/integration/test/HadoopUserAuthenticationIT.javaindex 18951584e7..e218561e7c 100644--- a/catalogs/catalog-fileset/src/test/java/org/apache/gravitino/catalog/fileset/integration/test/HadoopUserAuthenticationIT.java+++ b/catalogs/catalog-fileset/src/test/java/org/apache/gravitino/catalog/fileset/integration/test/HadoopUserAuthenticationIT.java@@ -57,7 +57,6 @@ import org.junit.jupiter.api.Test;import org.slf4j.Logger;import org.slf4j.LoggerFactory;import org.testcontainers.utility.MountableFile;-import sun.security.krb5.KrbException;@Tag("gravitino-docker-test")public class HadoopUserAuthenticationIT extends BaseIT {@@ -135,7 +134,7 @@ public class HadoopUserAuthenticationIT extends BaseIT {System.clearProperty("sun.security.krb5.debug");}- private static void prepareKerberosConfig() throws IOException, KrbException {+ private static void prepareKerberosConfig() throws IOException {// Keytab of the Gravitino SDK clientkerberosHiveContainer.getContainer()diff --git a/gradle.properties b/gradle.propertiesindex cf3547fb42..69052f0c96 100644--- a/gradle.properties+++ b/gradle.properties@@ -30,8 +30,8 @@ SONATYPE_USER = adminSONATYPE_PASSWORD = password# jdkVersion is used to specify the version of JDK to build and test Gravitino, current-# supported version is 8, 11, and 17.-jdkVersion = 8+# supported version is 17.+jdkVersion = 17# defaultScalaVersion is used to specify the version of Scala to build and test GravitinodefaultScalaVersion = 2.12diff --git a/iceberg/iceberg-rest-server/src/test/java/org/apache/gravitino/iceberg/integration/test/IcebergRestKerberosHiveCatalogIT.java b/iceberg/iceberg-rest-server/src/test/java/org/apache/gravitino/iceberg/integration/test/IcebergRestKerberosHiveCatalogIT.javaindex cea5ced31b..7ab4be49a7 100644--- a/iceberg/iceberg-rest-server/src/test/java/org/apache/gravitino/iceberg/integration/test/IcebergRestKerberosHiveCatalogIT.java+++ b/iceberg/iceberg-rest-server/src/test/java/org/apache/gravitino/iceberg/integration/test/IcebergRestKerberosHiveCatalogIT.java@@ -19,6 +19,7 @@package org.apache.gravitino.iceberg.integration.test;import java.io.File;+import java.lang.reflect.Method;import java.nio.charset.StandardCharsets;import java.nio.file.Files;import java.util.HashMap;@@ -81,7 +82,7 @@ public class IcebergRestKerberosHiveCatalogIT extends IcebergRESTHiveCatalogIT {System.setProperty("java.security.krb5.realm", "HADOOPKRB");System.setProperty("java.security.krb5.kdc", ip);- sun.security.krb5.Config.refresh();+ refreshKerberosConfig();resetDefaultRealm();// Give cli@HADOOPKRB permission to access the hdfs@@ -157,4 +158,20 @@ public class IcebergRestKerberosHiveCatalogIT extends IcebergRESTHiveCatalogIT {return Objects.equals(mode, ITUtils.EMBEDDED_TEST_MODE);}++ private static void refreshKerberosConfig() {+ Class<?> classRef;+ try {+ if (System.getProperty("java.vendor").contains("IBM")) {+ classRef = Class.forName("com.ibm.security.krb5.internal.Config");+ } else {+ classRef = Class.forName("sun.security.krb5.Config");+ }++ Method refershMethod = classRef.getMethod("refresh");+ refershMethod.invoke(null);+ } catch (Exception e) {+ throw new RuntimeException(e);+ }+ }}