Skip to content

Commit

Permalink
find class h2 driver
Browse files Browse the repository at this point in the history
  • Loading branch information
xunliu committed Sep 23, 2024
1 parent df12196 commit 75ca44b
Show file tree
Hide file tree
Showing 9 changed files with 35 additions and 9 deletions.
1 change: 0 additions & 1 deletion authorizations/authorization-ranger/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ dependencies {
testImplementation(project(":catalogs:catalog-common"))
testImplementation(project(":integration-test-common", "testArtifacts"))
testImplementation(libs.mockito.core)
testImplementation(libs.h2db)
testImplementation(libs.mysql.driver)
testImplementation(libs.postgresql.driver)
testImplementation("org.apache.spark:spark-hive_$scalaVersion:$sparkVersion")
Expand Down
3 changes: 1 addition & 2 deletions catalogs/catalog-hadoop/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,9 @@ dependencies {
implementation(libs.slf4j.api)

testImplementation(project(":integration-test-common", "testArtifacts"))

testImplementation(libs.bundles.metrics)
testImplementation(libs.minikdc)
testImplementation(libs.hadoop3.minicluster)

testImplementation(libs.bundles.log4j)
testImplementation(libs.mockito.core)
testImplementation(libs.mockito.inline)
Expand Down
2 changes: 1 addition & 1 deletion catalogs/catalog-hive/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ dependencies {
exclude("com.google.code.findbugs", "sr305")
exclude("com.tdunning", "json")
exclude("com.zaxxer", "HikariCP")
exclude("io.dropwizard.metricss")
exclude("io.dropwizard.metrics")
exclude("javax.transaction", "transaction-api")
exclude("org.apache.ant")
exclude("org.apache.avro")
Expand Down
5 changes: 2 additions & 3 deletions catalogs/catalog-kafka/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,12 @@ dependencies {
implementation(project(":common")) {
exclude("*")
}

testImplementation(project(":integration-test-common", "testArtifacts"))

implementation(libs.guava)
implementation(libs.kafka.clients)
implementation(libs.slf4j.api)

testImplementation(project(":integration-test-common", "testArtifacts"))
testImplementation(project(":core"))
testImplementation(libs.commons.io)
testImplementation(libs.curator.test)
testImplementation(libs.kafka)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ public String startH2Database(Config config) {

String connectionUrl = constructH2URI(originalJDBCUrl, storagePath);

try {
Class.forName("org.h2.Driver");
} catch (ClassNotFoundException e) {
throw new RuntimeException("Failed to load H2 driver.", e);
}

try (Connection connection = DriverManager.getConnection(connectionUrl, username, password);
Statement statement = connection.createStatement()) {
String sqlContent =
Expand Down
1 change: 1 addition & 0 deletions integration-test-common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ val testShadowJar by tasks.registering(ShadowJar::class) {
archiveClassifier.set("tests-shadow")
// avoid conflict with Spark test
exclude("org/apache/logging/slf4j/**")
// exclude("com/fasterxml/jackson/**")
relocate("org.eclipse.jetty", "org.apache.gravitino.it.shaded.org.eclipse.jetty")
from(sourceSets["test"].output)
}
Expand Down
8 changes: 8 additions & 0 deletions spark-connector/v3.3/spark/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,14 @@ dependencies {
exclude("org.apache.logging.log4j")
exclude("org.slf4j")
}
testImplementation(project(":server")) {
exclude("org.apache.logging.log4j")
exclude("org.slf4j")
}
testImplementation(project(":server-common")) {
exclude("org.apache.logging.log4j")
exclude("org.slf4j")
}
testImplementation(project(":spark-connector:spark-common", "testArtifacts")) {
exclude("com.fasterxml.jackson")
}
Expand Down
8 changes: 8 additions & 0 deletions spark-connector/v3.4/spark/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,14 @@ dependencies {
exclude("org.apache.logging.log4j")
exclude("org.slf4j")
}
testImplementation(project(":server")) {
exclude("org.apache.logging.log4j")
exclude("org.slf4j")
}
testImplementation(project(":server-common")) {
exclude("org.apache.logging.log4j")
exclude("org.slf4j")
}
testImplementation(project(":spark-connector:spark-common", "testArtifacts")) {
exclude("com.fasterxml.jackson")
}
Expand Down
10 changes: 8 additions & 2 deletions spark-connector/v3.5/spark/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,17 @@ dependencies {
exclude("org.apache.logging.log4j")
exclude("org.slf4j")
}
testImplementation(project(":spark-connector:spark-common", "testArtifacts")) {
exclude("com.fasterxml.jackson")
testImplementation(project(":server")) {
exclude("org.apache.logging.log4j")
exclude("org.slf4j")
}
testImplementation(project(":server-common")) {
exclude("org.apache.logging.log4j")
exclude("org.slf4j")
}
testImplementation(project(":spark-connector:spark-common", "testArtifacts")) {
exclude("com.fasterxml.jackson")
}

testImplementation(libs.hive2.common) {
exclude("com.sun.jersey")
Expand Down

0 comments on commit 75ca44b

Please sign in to comment.