-
Notifications
You must be signed in to change notification settings - Fork 383
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
53 changed files
with
1,232 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,124 @@ | ||
/* | ||
* Copyright 2023 Datastrato Pvt Ltd. | ||
* This software is licensed under the Apache License version 2. | ||
*/ | ||
description = "iceberg-common" | ||
|
||
plugins { | ||
`maven-publish` | ||
id("java") | ||
id("idea") | ||
} | ||
|
||
val scalaVersion: String = project.properties["scalaVersion"] as? String ?: extra["defaultScalaVersion"].toString() | ||
val sparkVersion: String = libs.versions.spark34.get() | ||
val sparkMajorVersion: String = sparkVersion.substringBeforeLast(".") | ||
val icebergVersion: String = libs.versions.iceberg.get() | ||
val scalaCollectionCompatVersion: String = libs.versions.scala.collection.compat.get() | ||
|
||
dependencies { | ||
implementation(project(":core")) | ||
implementation(project(":server-common")) | ||
implementation(libs.bundles.iceberg) | ||
implementation(libs.bundles.log4j) | ||
implementation(libs.commons.lang3) | ||
implementation(libs.guava) | ||
implementation(libs.iceberg.hive.metastore) | ||
implementation(libs.hadoop2.common) { | ||
exclude("com.github.spotbugs") | ||
} | ||
implementation(libs.hadoop2.hdfs) | ||
implementation(libs.hadoop2.mapreduce.client.core) | ||
|
||
annotationProcessor(libs.lombok) | ||
|
||
compileOnly(libs.lombok) | ||
|
||
testImplementation(project(":integration-test-common", "testArtifacts")) | ||
testImplementation(project(":server")) | ||
|
||
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) | ||
testImplementation(libs.mockito.core) | ||
|
||
testImplementation(libs.slf4j.api) | ||
testImplementation(libs.testcontainers) | ||
|
||
testRuntimeOnly(libs.junit.jupiter.engine) | ||
} | ||
|
||
tasks { | ||
val runtimeJars by registering(Copy::class) { | ||
from(configurations.runtimeClasspath) | ||
into("build/libs") | ||
} | ||
|
||
val copyCatalogLibs by registering(Copy::class) { | ||
dependsOn("jar", "runtimeJars") | ||
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") | ||
|
||
include("lakehouse-iceberg.conf") | ||
include("core-site.xml.template") | ||
include("hdfs-site.xml.template") | ||
|
||
rename { original -> | ||
if (original.endsWith(".template")) { | ||
original.replace(".template", "") | ||
} else { | ||
original | ||
} | ||
} | ||
|
||
exclude { details -> | ||
details.file.isDirectory() | ||
} | ||
} | ||
|
||
register("copyLibAndConfig", Copy::class) { | ||
dependsOn(copyCatalogLibs, copyCatalogConfig) | ||
} | ||
} | ||
|
||
tasks.test { | ||
val skipUTs = project.hasProperty("skipTests") | ||
if (skipUTs) { | ||
// Only run integration tests | ||
include("**/integration/**") | ||
} | ||
|
||
val skipITs = project.hasProperty("skipITs") | ||
if (skipITs) { | ||
// Exclude integration tests | ||
exclude("**/integration/**") | ||
} else { | ||
dependsOn(tasks.jar) | ||
|
||
doFirst { | ||
environment("GRAVITINO_CI_HIVE_DOCKER_IMAGE", "datastrato/gravitino-ci-hive:0.1.12") | ||
environment("GRAVITINO_CI_KERBEROS_HIVE_DOCKER_IMAGE", "datastrato/gravitino-ci-kerberos-hive:0.1.2") | ||
} | ||
|
||
val init = project.extra.get("initIntegrationTest") as (Test) -> Unit | ||
init(this) | ||
} | ||
} | ||
|
||
tasks.clean { | ||
delete("spark-warehouse") | ||
} | ||
|
||
tasks.getByName("generateMetadataFileForMavenJavaPublication") { | ||
dependsOn("runtimeJars") | ||
} |
12 changes: 12 additions & 0 deletions
12
...g-common/src/main/java/com/datastrato/gravitino/iceberg/common/IcebergCatalogBackend.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/* | ||
* Copyright 2023 Datastrato Pvt Ltd. | ||
* This software is licensed under the Apache License version 2. | ||
*/ | ||
package com.datastrato.gravitino.iceberg.common; | ||
|
||
public enum IcebergCatalogBackend { | ||
HIVE, | ||
JDBC, | ||
MEMORY, | ||
REST | ||
} |
Oops, something went wrong.