World's most powerful open data catalog for building a high-performance, geo-distributed and federated metadata lake.
Java ai-catalogdata-catalogdatalakefederated-querylakehousemetadatametalakemodel-catalogopendatacatalogskycomputingstratosphere
[#935] fix(CI): Fix kotlin style (#937)
Jerry Shao7ba7a19b9f18
diff --git a/build.gradle.kts b/build.gradle.ktsindex 172f14c91b..4c65cd213b 100644--- a/build.gradle.kts+++ b/build.gradle.kts@@ -2,16 +2,16 @@* Copyright 2023 Datastrato.* This software is licensed under the Apache License version 2.*/-import com.github.vlsi.gradle.dsl.configureEach-import java.util.Locale-import java.io.File-import org.gradle.internal.hash.ChecksumService-import org.gradle.kotlin.dsl.support.serviceOf-import com.github.jk1.license.render.ReportRenderer-import com.github.jk1.license.render.InventoryHtmlReportRendererimport com.github.jk1.license.filter.DependencyFilterimport com.github.jk1.license.filter.LicenseBundleNormalizer+import com.github.jk1.license.render.InventoryHtmlReportRenderer+import com.github.jk1.license.render.ReportRenderer+import com.github.vlsi.gradle.dsl.configureEachimport org.gradle.api.tasks.testing.logging.TestExceptionFormat+import org.gradle.internal.hash.ChecksumService+import org.gradle.kotlin.dsl.support.serviceOf+import java.io.File+import java.util.Localeplugins {`maven-publish`@@ -23,12 +23,15 @@ plugins {// Spotless version < 6.19.0 (https://github.com/diffplug/spotless/issues/1819) has an issue// running against JDK21, but we cannot upgrade the spotless to 6.19.0 or later since it only// support JDK11+. So we don't support JDK21 and thrown an exception for now.- if (JavaVersion.current() >= JavaVersion.VERSION_1_8- && JavaVersion.current() <= JavaVersion.VERSION_17) {+ if (JavaVersion.current() >= JavaVersion.VERSION_1_8 &&+ JavaVersion.current() <= JavaVersion.VERSION_17+ ) {alias(libs.plugins.spotless)} else {- throw GradleException("Gravitino Gradle current doesn't support " +- "Java version: ${JavaVersion.current()}. Please use JDK8 to 17.")+ throw GradleException(+ "Gravitino Gradle current doesn't support " ++ "Java version: ${JavaVersion.current()}. Please use JDK8 to 17."+ )}alias(libs.plugins.publish)@@ -39,16 +42,48 @@ plugins {}licenseReport {- renderers = arrayOf<ReportRenderer>(InventoryHtmlReportRenderer("report.html", "Backend"))- filters = arrayOf<DependencyFilter>(LicenseBundleNormalizer())+ renderers = arrayOf<ReportRenderer>(InventoryHtmlReportRenderer("report.html", "Backend"))+ filters = arrayOf<DependencyFilter>(LicenseBundleNormalizer())}repositories { mavenCentral() }allprojects {+ apply(plugin = "com.diffplug.spotless")+repositories {mavenCentral()mavenLocal()}++ plugins.withType<com.diffplug.gradle.spotless.SpotlessPlugin>().configureEach {+ configure<com.diffplug.gradle.spotless.SpotlessExtension> {+ java {+ // Fix the Google Java Format version to 1.7. Since JDK8 only support Google Java Format+ // 1.7, which is not compatible with JDK17. We will use a newer version when we upgrade to+ // JDK17.+ googleJavaFormat("1.7")+ removeUnusedImports()+ trimTrailingWhitespace()+ replaceRegex(+ "Remove wildcard imports",+ "import\\s+[^\\*\\s]+\\*;(\\r\\n|\\r|\\n)",+ "$1"+ )+ replaceRegex(+ "Remove static wildcard imports",+ "import\\s+(?:static\\s+)?[^*\\s]+\\*;(\\r\\n|\\r|\\n)",+ "$1"+ )++ targetExclude("**/build/**")+ }++ kotlinGradle {+ target("*.gradle.kts")+ ktlint().editorConfigOverride(mapOf("indent_size" to 2))+ }+ }+ }}nexusPublishing {@@ -58,11 +93,11 @@ nexusPublishing {snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))val sonatypeUser =- System.getenv("SONATYPE_USER").takeUnless { it.isNullOrEmpty() }- ?: extra["SONATYPE_USER"].toString()+ System.getenv("SONATYPE_USER").takeUnless { it.isNullOrEmpty() }+ ?: extra["SONATYPE_USER"].toString()val sonatypePassword =- System.getenv("SONATYPE_PASSWORD").takeUnless { it.isNullOrEmpty() }- ?: extra["SONATYPE_PASSWORD"].toString()+ System.getenv("SONATYPE_PASSWORD").takeUnless { it.isNullOrEmpty() }+ ?: extra["SONATYPE_PASSWORD"].toString()username.set(sonatypeUser)password.set(sonatypePassword)@@ -80,7 +115,6 @@ subprojects {apply(plugin = "jacoco")apply(plugin = "maven-publish")apply(plugin = "java")- apply(plugin = "com.diffplug.spotless")repositories {mavenCentral()@@ -180,7 +214,7 @@ subprojects {val allDeps by tasks.registering(DependencyReportTask::class)group = "com.datastrato.gravitino"- version = "${version}"+ version = "$version"tasks.withType<Jar> {archiveBaseName.set("${rootProject.name.lowercase(Locale.getDefault())}-${project.name}")@@ -194,31 +228,6 @@ subprojects {exclude("test/**")}}-- plugins.withType<com.diffplug.gradle.spotless.SpotlessPlugin>().configureEach {- configure<com.diffplug.gradle.spotless.SpotlessExtension> {- java {- // Fix the Google Java Format version to 1.7. Since JDK8 only support Google Java Format- // 1.7, which is not compatible with JDK17. We will use a newer version when we upgrade to- // JDK17.- googleJavaFormat("1.7")- removeUnusedImports()- trimTrailingWhitespace()- replaceRegex(- "Remove wildcard imports",- "import\\s+[^\\*\\s]+\\*;(\\r\\n|\\r|\\n)",- "$1"- )- replaceRegex(- "Remove static wildcard imports",- "import\\s+(?:static\\s+)?[^*\\s]+\\*;(\\r\\n|\\r|\\n)",- "$1"- )-- targetExclude("**/build/**")- }- }- }}tasks.rat {@@ -286,7 +295,7 @@ tasks {copy {from(projectDir.dir("conf")) { into("package/conf") }from(projectDir.dir("bin")) { into("package/bin") }- from(projectDir.dir("web/build/libs/${rootProject.name}-web-${version}.war")) { into("package/web") }+ from(projectDir.dir("web/build/libs/${rootProject.name}-web-$version.war")) { into("package/web") }into(outputDir)rename { fileName ->fileName.replace(".template", "")@@ -314,10 +323,10 @@ tasks {dependsOn("assembleTrinoConnector")group = "gravitino distribution"finalizedBy("checksumDistribution")- into("${rootProject.name}-${version}-bin")+ into("${rootProject.name}-$version-bin")from(compileDistribution.map { it.outputs.files.single() })compression = Compression.GZIP- archiveFileName.set("${rootProject.name}-${version}-bin.tar.gz")+ archiveFileName.set("${rootProject.name}-$version-bin.tar.gz")destinationDirectory.set(projectDir.dir("distribution"))}@@ -325,10 +334,10 @@ tasks {dependsOn("trino-connector:copyLibs")group = "gravitino distribution"finalizedBy("checksumTrinoConnector")- into("${rootProject.name}-trino-connector-${version}")+ into("${rootProject.name}-trino-connector-$version")from("trino-connector/build/libs")compression = Compression.GZIP- archiveFileName.set("${rootProject.name}-trino-connector-${version}.tar.gz")+ archiveFileName.set("${rootProject.name}-trino-connector-$version.tar.gz")destinationDirectory.set(projectDir.dir("distribution"))}@@ -359,7 +368,7 @@ tasks {outputs.file(checksumFile)doLast {checksumFile.get().writeText(- serviceOf<ChecksumService>().sha256(archiveFile.get().asFile).toString()+ serviceOf<ChecksumService>().sha256(archiveFile.get().asFile).toString())}}@@ -371,10 +380,10 @@ tasks {val copySubprojectDependencies by registering(Copy::class) {subprojects.forEach() {- if (!it.name.startsWith("catalog")- && !it.name.startsWith("client")- && it.name != "trino-connector"- && it.name != "integration-test") {+ if (!it.name.startsWith("catalog") &&+ !it.name.startsWith("client") && it.name != "trino-connector" &&+ it.name != "integration-test"+ ) {from(it.configurations.runtimeClasspath)into("distribution/package/libs")}@@ -383,10 +392,11 @@ tasks {val copySubprojectLib by registering(Copy::class) {subprojects.forEach() {- if (!it.name.startsWith("catalog")- && !it.name.startsWith("client")- && it.name != "trino-connector"- && it.name != "integration-test") {+ if (!it.name.startsWith("catalog") &&+ !it.name.startsWith("client") &&+ it.name != "trino-connector" &&+ it.name != "integration-test"+ ) {dependsOn("${it.name}:build")from("${it.name}/build/libs")into("distribution/package/libs")@@ -397,9 +407,11 @@ tasks {}val copyCatalogLibAndConfigs by registering(Copy::class) {- dependsOn(":catalogs:catalog-hive:copyLibAndConfig",- ":catalogs:catalog-lakehouse-iceberg:copyLibAndConfig",- ":catalogs:catalog-jdbc-mysql:copyLibAndConfig")+ dependsOn(+ ":catalogs:catalog-hive:copyLibAndConfig",+ ":catalogs:catalog-lakehouse-iceberg:copyLibAndConfig",+ ":catalogs:catalog-jdbc-mysql:copyLibAndConfig"+ )}clean {diff --git a/catalogs/catalog-hive/build.gradle.kts b/catalogs/catalog-hive/build.gradle.ktsindex 492bb4d09b..d09eab3f84 100644--- a/catalogs/catalog-hive/build.gradle.kts+++ b/catalogs/catalog-hive/build.gradle.kts@@ -5,104 +5,106 @@description = "catalog-hive"plugins {- `maven-publish`- id("java")- id("idea")+ `maven-publish`+ id("java")+ id("idea")}dependencies {- implementation(project(":api"))- implementation(project(":core"))+ implementation(project(":api"))+ implementation(project(":core"))- compileOnly(libs.lombok)- annotationProcessor(libs.lombok)+ compileOnly(libs.lombok)+ annotationProcessor(libs.lombok)- implementation(libs.hive2.metastore) {- exclude("org.apache.hbase")- exclude("org.apache.hadoop", "hadoop-yarn-server-resourcemanager")- exclude("co.cask.tephra")- exclude("org.apache.avro")- exclude("org.apache.zookeeper")- exclude("org.apache.logging.log4j")- exclude("com.google.code.findbugs", "sr305")- exclude("org.eclipse.jetty.aggregate", "jetty-all")- exclude("org.eclipse.jetty.orbit", "javax.servlet")- exclude("org.apache.parquet", "parquet-hadoop-bundle")- exclude("com.tdunning", "json")- exclude("javax.transaction", "transaction-api")- exclude("com.zaxxer", "HikariCP")- exclude("com.google.code.findbugs", "jsr305")- exclude("org.apache.curator")- exclude("com.github.joshelser")- exclude("io.dropwizard.metricss")- exclude("org.slf4j")- }+ implementation(libs.hive2.metastore) {+ exclude("org.apache.hbase")+ exclude("org.apache.hadoop", "hadoop-yarn-server-resourcemanager")+ exclude("co.cask.tephra")+ exclude("org.apache.avro")+ exclude("org.apache.zookeeper")+ exclude("org.apache.logging.log4j")+ exclude("com.google.code.findbugs", "sr305")+ exclude("org.eclipse.jetty.aggregate", "jetty-all")+ exclude("org.eclipse.jetty.orbit", "javax.servlet")+ exclude("org.apache.parquet", "parquet-hadoop-bundle")+ exclude("com.tdunning", "json")+ exclude("javax.transaction", "transaction-api")+ exclude("com.zaxxer", "HikariCP")+ exclude("com.google.code.findbugs", "jsr305")+ exclude("org.apache.curator")+ exclude("com.github.joshelser")+ exclude("io.dropwizard.metricss")+ exclude("org.slf4j")+ }- implementation(libs.hive2.exec) {- artifact {- classifier = "core"- }- exclude("org.apache.hadoop", "hadoop-yarn-server-resourcemanager")- exclude("org.apache.avro")- exclude("org.apache.zookeeper")- exclude("com.google.protobuf")- exclude("org.apache.calcite")- exclude("org.apache.calcite.avatica")- exclude("org.eclipse.jetty.aggregate", "jetty-all")- exclude("org.eclipse.jetty.orbit", "javax.servlet")- exclude("com.google.code.findbugs", "jsr305")- exclude("org.apache.logging.log4j")- exclude("org.apache.curator")- exclude("org.pentaho")- exclude("org.slf4j")+ implementation(libs.hive2.exec) {+ artifact {+ classifier = "core"}+ exclude("org.apache.hadoop", "hadoop-yarn-server-resourcemanager")+ exclude("org.apache.avro")+ exclude("org.apache.zookeeper")+ exclude("com.google.protobuf")+ exclude("org.apache.calcite")+ exclude("org.apache.calcite.avatica")+ exclude("org.eclipse.jetty.aggregate", "jetty-all")+ exclude("org.eclipse.jetty.orbit", "javax.servlet")+ exclude("com.google.code.findbugs", "jsr305")+ exclude("org.apache.logging.log4j")+ exclude("org.apache.curator")+ exclude("org.pentaho")+ exclude("org.slf4j")+ }- implementation(libs.hadoop2.mapreduce.client.core) {- exclude("*")- }- implementation(libs.hadoop2.common) {- exclude("*")- }+ implementation(libs.hadoop2.mapreduce.client.core) {+ exclude("*")+ }+ implementation(libs.hadoop2.common) {+ exclude("*")+ }- implementation(libs.slf4j.api)- implementation(libs.guava)+ implementation(libs.slf4j.api)+ implementation(libs.guava)- testImplementation(libs.junit.jupiter.api)- testRuntimeOnly(libs.junit.jupiter.engine)- testImplementation(libs.mockito.core)+ testImplementation(libs.junit.jupiter.api)+ testRuntimeOnly(libs.junit.jupiter.engine)+ testImplementation(libs.mockito.core)}tasks {- val copyDepends by registering(Copy::class) {- from(configurations.runtimeClasspath)- into("build/libs")- }+ val copyDepends by registering(Copy::class) {+ from(configurations.runtimeClasspath)+ into("build/libs")+ }- val copyCatalogLibs by registering(Copy::class) {- dependsOn(copyDepends, "build")- from("build/libs")- into("${rootDir}/distribution/package/catalogs/hive/libs")- }-- val copyCatalogConfig by registering(Copy::class) {- from("src/main/resources")- into("${rootDir}/distribution/package/catalogs/hive/conf")+ val copyCatalogLibs by registering(Copy::class) {+ dependsOn(copyDepends, "build")+ from("build/libs")+ into("$rootDir/distribution/package/catalogs/hive/libs")+ }- include("hive.conf")- include("hive-site.xml.template")+ val copyCatalogConfig by registering(Copy::class) {+ from("src/main/resources")+ into("$rootDir/distribution/package/catalogs/hive/conf")- rename { original -> if (original.endsWith(".template")) {- original.replace(".template", "")- } else {- original- }}+ include("hive.conf")+ include("hive-site.xml.template")- exclude { details ->- details.file.isDirectory()- }+ rename { original ->+ if (original.endsWith(".template")) {+ original.replace(".template", "")+ } else {+ original+ }}- val copyLibAndConfig by registering(Copy::class) {- dependsOn(copyCatalogConfig, copyCatalogLibs)+ exclude { details ->+ details.file.isDirectory()}+ }++ val copyLibAndConfig by registering(Copy::class) {+ dependsOn(copyCatalogConfig, copyCatalogLibs)+ }}diff --git a/catalogs/catalog-jdbc-common/build.gradle.kts b/catalogs/catalog-jdbc-common/build.gradle.ktsindex 79458c3799..85354f16b0 100644--- a/catalogs/catalog-jdbc-common/build.gradle.kts+++ b/catalogs/catalog-jdbc-common/build.gradle.kts@@ -5,30 +5,30 @@description = "catalog-jdbc-common"plugins {- `maven-publish`- id("java")- id("idea")+ `maven-publish`+ id("java")+ id("idea")}dependencies {- implementation(project(":common"))- implementation(project(":core"))- implementation(project(":api"))- implementation(libs.jackson.databind)- implementation(libs.jackson.annotations)- implementation(libs.jackson.datatype.jdk8)- implementation(libs.jackson.datatype.jsr310)- implementation(libs.guava)- implementation(libs.bundles.log4j)- implementation(libs.commons.lang3)- implementation(libs.commons.collections4)- implementation(libs.commons.dbcp2)+ implementation(project(":common"))+ implementation(project(":core"))+ implementation(project(":api"))+ implementation(libs.jackson.databind)+ implementation(libs.jackson.annotations)+ implementation(libs.jackson.datatype.jdk8)+ implementation(libs.jackson.datatype.jsr310)+ implementation(libs.guava)+ implementation(libs.bundles.log4j)+ implementation(libs.commons.lang3)+ implementation(libs.commons.collections4)+ implementation(libs.commons.dbcp2)- testImplementation(libs.commons.io)- testImplementation(libs.sqlite.jdbc)- testImplementation(libs.junit.jupiter.api)- testImplementation(libs.junit.jupiter.params)- testRuntimeOnly(libs.junit.jupiter.engine)- compileOnly(libs.lombok)- annotationProcessor(libs.lombok)+ testImplementation(libs.commons.io)+ testImplementation(libs.sqlite.jdbc)+ testImplementation(libs.junit.jupiter.api)+ testImplementation(libs.junit.jupiter.params)+ testRuntimeOnly(libs.junit.jupiter.engine)+ compileOnly(libs.lombok)+ annotationProcessor(libs.lombok)}diff --git a/catalogs/catalog-jdbc-mysql/build.gradle.kts b/catalogs/catalog-jdbc-mysql/build.gradle.ktsindex 2589bc85b4..a3a05c356a 100644--- a/catalogs/catalog-jdbc-mysql/build.gradle.kts+++ b/catalogs/catalog-jdbc-mysql/build.gradle.kts@@ -5,45 +5,45 @@description = "catalog-jdbc-mysql"plugins {- `maven-publish`- id("java")- id("idea")+ `maven-publish`+ id("java")+ id("idea")}dependencies {- implementation(project(":common"))- implementation(project(":core"))- implementation(project(":api"))- implementation(project(":catalogs:catalog-jdbc-common"))- implementation(libs.bundles.log4j)- implementation(libs.commons.lang3)- implementation(libs.commons.collections4)- implementation(libs.jsqlparser)+ implementation(project(":common"))+ implementation(project(":core"))+ implementation(project(":api"))+ implementation(project(":catalogs:catalog-jdbc-common"))+ implementation(libs.bundles.log4j)+ implementation(libs.commons.lang3)+ implementation(libs.commons.collections4)+ implementation(libs.jsqlparser)}tasks {- val copyDepends by registering(Copy::class) {- from(configurations.runtimeClasspath)- into("build/libs")- }- val copyCatalogLibs by registering(Copy::class) {- dependsOn(copyDepends, "build")- from("build/libs")- into("${rootDir}/distribution/package/catalogs/jdbc-mysql/libs")- }+ val copyDepends by registering(Copy::class) {+ from(configurations.runtimeClasspath)+ into("build/libs")+ }+ val copyCatalogLibs by registering(Copy::class) {+ dependsOn(copyDepends, "build")+ from("build/libs")+ into("$rootDir/distribution/package/catalogs/jdbc-mysql/libs")+ }- val copyCatalogConfig by registering(Copy::class) {- from("src/main/resources")- into("${rootDir}/distribution/package/catalogs/jdbc-mysql/conf")+ val copyCatalogConfig by registering(Copy::class) {+ from("src/main/resources")+ into("$rootDir/distribution/package/catalogs/jdbc-mysql/conf")- include("jdbc-mysql.conf")+ include("jdbc-mysql.conf")- exclude { details ->- details.file.isDirectory()- }+ exclude { details ->+ details.file.isDirectory()}+ }- val copyLibAndConfig by registering(Copy::class) {- dependsOn(copyCatalogLibs, copyCatalogConfig)- }+ val copyLibAndConfig by registering(Copy::class) {+ dependsOn(copyCatalogLibs, copyCatalogConfig)+ }}diff --git a/catalogs/catalog-lakehouse-iceberg/build.gradle.kts b/catalogs/catalog-lakehouse-iceberg/build.gradle.ktsindex 5e51bfaf89..f7ef1bc6fe 100644--- a/catalogs/catalog-lakehouse-iceberg/build.gradle.kts+++ b/catalogs/catalog-lakehouse-iceberg/build.gradle.kts@@ -5,105 +5,107 @@description = "catalog-lakehouse-iceberg"plugins {- `maven-publish`- id("java")- id("idea")+ `maven-publish`+ id("java")+ id("idea")}dependencies {- implementation(project(":common"))- implementation(project(":core"))- implementation(project(":api"))- implementation(project(":server-common"))- implementation(libs.jackson.databind)- implementation(libs.jackson.annotations)- implementation(libs.jackson.datatype.jdk8)- implementation(libs.jackson.datatype.jsr310)- implementation(libs.guava)- implementation(libs.commons.lang3)- implementation(libs.bundles.log4j)- implementation(libs.bundles.jetty)- implementation(libs.bundles.jersey)- implementation(libs.bundles.iceberg)- implementation(libs.commons.lang3)- implementation(libs.commons.io)- implementation(libs.commons.collections4)- implementation(libs.iceberg.hive.metastore)- implementation(libs.sqlite.jdbc)+ implementation(project(":common"))+ implementation(project(":core"))+ implementation(project(":api"))+ implementation(project(":server-common"))+ implementation(libs.jackson.databind)+ implementation(libs.jackson.annotations)+ implementation(libs.jackson.datatype.jdk8)+ implementation(libs.jackson.datatype.jsr310)+ implementation(libs.guava)+ implementation(libs.commons.lang3)+ implementation(libs.bundles.log4j)+ implementation(libs.bundles.jetty)+ implementation(libs.bundles.jersey)+ implementation(libs.bundles.iceberg)+ implementation(libs.commons.lang3)+ implementation(libs.commons.io)+ implementation(libs.commons.collections4)+ implementation(libs.iceberg.hive.metastore)+ implementation(libs.sqlite.jdbc)- implementation(libs.hive2.metastore) {- exclude("org.apache.avro", "avro")- exclude("org.slf4j", "slf4j-log4j12")- exclude("org.pentaho") // missing dependency- exclude("org.apache.hbase")- exclude("org.apache.logging.log4j")- exclude("co.cask.tephra")- exclude("com.google.code.findbugs", "jsr305")- exclude("org.eclipse.jetty.aggregate","jetty-all")- exclude("org.eclipse.jetty.orbit","javax.servlet")- exclude("org.apache.parquet", "parquet-hadoop-bundle")- exclude("com.tdunning", "json")- exclude("javax.transaction", "transaction-api")- exclude("com.zaxxer","HikariCP")- exclude("org.apache.zookeeper")- exclude("org.apache.hadoop", "hadoop-yarn-server-common")- exclude("org.apache.hadoop", "hadoop-yarn-server-applicationhistoryservice")- exclude("org.apache.hadoop", "hadoop-yarn-server-web-proxy")- exclude("org.apache.hadoop", "hadoop-yarn-api")- exclude("org.apache.hadoop", "hadoop-yarn-server-resourcemanager")- }+ implementation(libs.hive2.metastore) {+ exclude("org.apache.avro", "avro")+ exclude("org.slf4j", "slf4j-log4j12")+ exclude("org.pentaho") // missing dependency+ exclude("org.apache.hbase")+ exclude("org.apache.logging.log4j")+ exclude("co.cask.tephra")+ exclude("com.google.code.findbugs", "jsr305")+ exclude("org.eclipse.jetty.aggregate", "jetty-all")+ exclude("org.eclipse.jetty.orbit", "javax.servlet")+ exclude("org.apache.parquet", "parquet-hadoop-bundle")+ exclude("com.tdunning", "json")+ exclude("javax.transaction", "transaction-api")+ exclude("com.zaxxer", "HikariCP")+ exclude("org.apache.zookeeper")+ exclude("org.apache.hadoop", "hadoop-yarn-server-common")+ exclude("org.apache.hadoop", "hadoop-yarn-server-applicationhistoryservice")+ exclude("org.apache.hadoop", "hadoop-yarn-server-web-proxy")+ exclude("org.apache.hadoop", "hadoop-yarn-api")+ exclude("org.apache.hadoop", "hadoop-yarn-server-resourcemanager")+ }- implementation(libs.hadoop2.hdfs)- implementation(libs.hadoop2.common)- implementation(libs.hadoop2.mapreduce.client.core)- implementation(libs.metrics.jersey2)+ implementation(libs.hadoop2.hdfs)+ implementation(libs.hadoop2.common)+ implementation(libs.hadoop2.mapreduce.client.core)+ implementation(libs.metrics.jersey2)- compileOnly(libs.lombok)- annotationProcessor(libs.lombok)+ compileOnly(libs.lombok)+ annotationProcessor(libs.lombok)- testImplementation(libs.junit.jupiter.api)- testImplementation(libs.junit.jupiter.params)- testRuntimeOnly(libs.junit.jupiter.engine)- testImplementation(libs.mockito.core)- testImplementation(libs.jersey.test.framework.core) {- exclude(group = "org.junit.jupiter")- }- testImplementation(libs.jersey.test.framework.provider.jetty) {- exclude(group = "org.junit.jupiter")- }+ testImplementation(libs.junit.jupiter.api)+ testImplementation(libs.junit.jupiter.params)+ testRuntimeOnly(libs.junit.jupiter.engine)+ testImplementation(libs.mockito.core)+ testImplementation(libs.jersey.test.framework.core) {+ exclude(group = "org.junit.jupiter")+ }+ testImplementation(libs.jersey.test.framework.provider.jetty) {+ exclude(group = "org.junit.jupiter")+ }}tasks {- val copyDepends by registering(Copy::class) {- from(configurations.runtimeClasspath)- into("build/libs")- }- val copyCatalogLibs by registering(Copy::class) {- dependsOn(copyDepends, "build")- from("build/libs")- into("${rootDir}/distribution/package/catalogs/lakehouse-iceberg/libs")- }-- val copyCatalogConfig by registering(Copy::class) {- from("src/main/resources")- into("${rootDir}/distribution/package/catalogs/lakehouse-iceberg/conf")+ val copyDepends by registering(Copy::class) {+ from(configurations.runtimeClasspath)+ into("build/libs")+ }+ val copyCatalogLibs by registering(Copy::class) {+ dependsOn(copyDepends, "build")+ from("build/libs")+ into("$rootDir/distribution/package/catalogs/lakehouse-iceberg/libs")+ }- include("lakehouse-iceberg.conf")- include("hive-site.xml.template")- include("hdfs-site.xml.template")+ val copyCatalogConfig by registering(Copy::class) {+ from("src/main/resources")+ into("$rootDir/distribution/package/catalogs/lakehouse-iceberg/conf")- rename { original -> if (original.endsWith(".template")) {- original.replace(".template", "")- } else {- original- }}+ include("lakehouse-iceberg.conf")+ include("hive-site.xml.template")+ include("hdfs-site.xml.template")- exclude { details ->- details.file.isDirectory()- }+ rename { original ->+ if (original.endsWith(".template")) {+ original.replace(".template", "")+ } else {+ original+ }}- val copyLibAndConfig by registering(Copy::class) {- dependsOn(copyCatalogLibs, copyCatalogConfig)+ exclude { details ->+ details.file.isDirectory()}+ }++ val copyLibAndConfig by registering(Copy::class) {+ dependsOn(copyCatalogLibs, copyCatalogConfig)+ }}diff --git a/integration-test/build.gradle.kts b/integration-test/build.gradle.ktsindex b46d276fc9..71629e7c09 100644--- a/integration-test/build.gradle.kts+++ b/integration-test/build.gradle.kts@@ -2,8 +2,8 @@* Copyright 2023 Datastrato.* This software is licensed under the Apache License version 2.*/-import java.io.IOExceptionimport org.gradle.internal.os.OperatingSystem+import java.io.IOExceptionimport java.util.*plugins {@@ -140,9 +140,10 @@ fun printDockerCheckInfo() {val macDockerConnector = project.extra["macDockerConnector"] as? Boolean ?: falseval isOrbStack = project.extra["isOrbStack"] as? Boolean ?: false- if (OperatingSystem.current().isMacOsX()- && dockerRunning- && (macDockerConnector || isOrbStack)) {+ if (OperatingSystem.current().isMacOsX() &&+ dockerRunning &&+ (macDockerConnector || isOrbStack)+ ) {DOCKER_IT_TEST = true} else if (OperatingSystem.current().isLinux() && dockerRunning) {DOCKER_IT_TEST = true@@ -171,7 +172,7 @@ fun printDockerServerTip() {if (!dockerRunning) {val redColor = "\u001B[31m"val resetColor = "\u001B[0m"- println("Tip: Please make sure to start the ${redColor}Docker server${resetColor} before running the integration tests.")+ println("Tip: Please make sure to start the ${redColor}Docker server$resetColor before running the integration tests.")}}@@ -181,9 +182,11 @@ fun printMacDockerTip() {if (OperatingSystem.current().isMacOsX() && !macDockerConnector && !isOrbStack) {val redColor = "\u001B[31m"val resetColor = "\u001B[0m"- println("Tip: Please make sure to use ${redColor}OrbStack${resetColor} or execute the " +- "${redColor}`dev/docker/tools/mac-docker-connector.sh`${resetColor} script before running" +- " the integration test on macOS.")+ println(+ "Tip: Please make sure to use ${redColor}OrbStack$resetColor or execute the " ++ "$redColor`dev/docker/tools/mac-docker-connector.sh`$resetColor script before running" ++ " the integration test on macOS."+ )}}@@ -195,7 +198,7 @@ fun checkMacDockerConnector() {try {val processName = "docker-connector"- val command = "pgrep -x -q ${processName}"+ val command = "pgrep -x -q $processName"val execResult = project.exec {commandLine("bash", "-c", command)@@ -229,14 +232,14 @@ fun checkOrbStackStatus() {}try {- val process = ProcessBuilder("docker", "context", "show").start();+ val process = ProcessBuilder("docker", "context", "show").start()val exitCode = process.waitFor()if (exitCode == 0) {val currentContext = process.inputStream.bufferedReader().readText()println("Current docker context is: $currentContext")project.extra["isOrbStack"] = currentContext.lowercase(Locale.getDefault()).contains("orbstack")} else {- println("checkOrbStackStatus Command execution failed with exit code $exitCode")+ println("checkOrbStackStatus Command execution failed with exit code $exitCode")}} catch (e: IOException) {println("checkOrbStackStatus command execution failed: ${e.message}")diff --git a/meta/build.gradle.kts b/meta/build.gradle.ktsindex d5355a2a0c..7b77203ff8 100644--- a/meta/build.gradle.kts+++ b/meta/build.gradle.kts@@ -22,5 +22,5 @@ sourceSets {}protobuf {- protoc { artifact = "com.google.protobuf:protoc:${libs.versions.protoc.get()}"}+ protoc { artifact = "com.google.protobuf:protoc:${libs.versions.protoc.get()}" }}diff --git a/server/build.gradle.kts b/server/build.gradle.ktsindex db2deecf63..5a4aabbce0 100644--- a/server/build.gradle.kts+++ b/server/build.gradle.kts@@ -46,7 +46,7 @@ dependencies {}fun getGitCommitId(): String {- var gitCommitId = "";+ var gitCommitId = ""try {val gitFolder = rootDir.path + "/.git/"val head = File(gitFolder + "HEAD").readText().split(":")@@ -68,7 +68,7 @@ val propertiesFile = "src/main/resources/project.properties"fun writeProjectPropertiesFile() {val propertiesFile = file(propertiesFile)if (propertiesFile.exists()) {- propertiesFile.delete();+ propertiesFile.delete()}val dateFormat = SimpleDateFormat("dd/MM/yyyy HH:mm:ss")@@ -80,10 +80,12 @@ fun writeProjectPropertiesFile() {propertiesFile.parentFile.mkdirs()propertiesFile.createNewFile()propertiesFile.writer().use { writer ->- writer.write("#\n" +- "# Copyright 2023 Datastrato.\n" +- "# This software is licensed under the Apache License version 2.\n" +- "#\n")+ writer.write(+ "#\n" ++ "# Copyright 2023 Datastrato.\n" ++ "# This software is licensed under the Apache License version 2.\n" ++ "#\n"+ )writer.write("project.version=$projectVersion\n")writer.write("compile.date=$compileDate\n")writer.write("git.commit.id=$commitId\n")@@ -105,6 +107,6 @@ tasks {environment("GRAVITINO_TEST", "true")}clean {- delete("${propertiesFile}")+ delete("$propertiesFile")}}diff --git a/trino-connector/build.gradle.kts b/trino-connector/build.gradle.ktsindex 6cc4370db7..2e4a4c184b 100644--- a/trino-connector/build.gradle.kts+++ b/trino-connector/build.gradle.kts@@ -9,11 +9,11 @@ plugins {}repositories {- mavenCentral()+ mavenCentral()}dependencies {- implementation(project(":clients:client-java-runtime", configuration="shadow"))+ implementation(project(":clients:client-java-runtime", configuration = "shadow"))implementation(libs.jackson.databind)implementation(libs.jackson.annotations)implementation(libs.guava)@@ -36,21 +36,21 @@ dependencies {}tasks.named("generateMetadataFileForMavenJavaPublication") {- dependsOn(":trino-connector:copyDepends")+ dependsOn(":trino-connector:copyDepends")}tasks {- val copyDepends by registering(Copy::class) {- from(configurations.runtimeClasspath)- into("build/libs")- }- jar {- finalizedBy(copyDepends)- }+ val copyDepends by registering(Copy::class) {+ from(configurations.runtimeClasspath)+ into("build/libs")+ }+ jar {+ finalizedBy(copyDepends)+ }- val copyLibs by registering(Copy::class) {- dependsOn(copyDepends, "build")- from("build/libs")- into("${rootDir}/distribution/${rootProject.name}-trino-connector")- }+ val copyLibs by registering(Copy::class) {+ dependsOn(copyDepends, "build")+ from("build/libs")+ into("$rootDir/distribution/${rootProject.name}-trino-connector")+ }}