Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
caican committed Dec 6, 2024
1 parent dae7ccf commit 659338f
Show file tree
Hide file tree
Showing 12 changed files with 39 additions and 42 deletions.
12 changes: 10 additions & 2 deletions spark-connector/v3.3/spark/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ dependencies {
exclude("com.fasterxml.jackson")
}
compileOnly("org.apache.iceberg:iceberg-spark-runtime-${sparkMajorVersion}_$scalaVersion:$icebergVersion")
compileOnly("org.apache.paimon:paimon-spark-$sparkMajorVersion:$paimonVersion")
compileOnly("org.apache.paimon:paimon-spark-$sparkMajorVersion:$paimonVersion") {
exclude("org.apache.spark")
}

testImplementation(project(":api")) {
exclude("org.apache.logging.log4j")
Expand Down Expand Up @@ -124,7 +126,9 @@ dependencies {
testImplementation("org.apache.iceberg:iceberg-core:$icebergVersion")
testImplementation("org.apache.iceberg:iceberg-spark-runtime-${sparkMajorVersion}_$scalaVersion:$icebergVersion")
testImplementation("org.apache.iceberg:iceberg-hive-metastore:$icebergVersion")
testImplementation("org.apache.paimon:paimon-spark-$sparkMajorVersion:$paimonVersion")
testImplementation("org.apache.paimon:paimon-spark-$sparkMajorVersion:$paimonVersion") {
exclude("org.apache.spark")
}
testImplementation("org.apache.kyuubi:kyuubi-spark-connector-hive_$scalaVersion:$kyuubiVersion")
// include spark-sql,spark-catalyst,hive-common,hdfs-client
testImplementation("org.apache.spark:spark-hive_$scalaVersion:$sparkVersion") {
Expand All @@ -137,6 +141,9 @@ dependencies {
exclude("com.fasterxml.jackson.core")
}
testImplementation("org.scala-lang.modules:scala-collection-compat_$scalaVersion:$scalaCollectionCompatVersion")
testImplementation("org.apache.spark:spark-catalyst_$scalaVersion:$sparkVersion")
testImplementation("org.apache.spark:spark-core_$scalaVersion:$sparkVersion")
testImplementation("org.apache.spark:spark-sql_$scalaVersion:$sparkVersion")

testRuntimeOnly(libs.junit.jupiter.engine)
}
Expand All @@ -155,6 +162,7 @@ tasks.test {
dependsOn(":catalogs:catalog-lakehouse-iceberg:jar")
dependsOn(":catalogs:catalog-hive:jar")
dependsOn(":iceberg:iceberg-rest-server:jar")
dependsOn(":catalogs:catalog-lakehouse-paimon:jar")
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,7 @@ public class SparkHiveCatalogIT33 extends SparkHiveCatalogIT {
@Test
void testCatalogClassName() {
String catalogClass =
getSparkSession()
.sessionState()
.conf()
.getConfString("spark.sql.catalog." + getCatalogName());
getSparkSession().sparkContext().conf().get("spark.sql.catalog." + getCatalogName());
Assertions.assertEquals(GravitinoHiveCatalogSpark33.class.getName(), catalogClass);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,7 @@ public class SparkIcebergCatalogHiveBackendIT33 extends SparkIcebergCatalogHiveB
@Test
void testCatalogClassName() {
String catalogClass =
getSparkSession()
.sessionState()
.conf()
.getConfString("spark.sql.catalog." + getCatalogName());
getSparkSession().sparkContext().conf().get("spark.sql.catalog." + getCatalogName());
Assertions.assertEquals(GravitinoIcebergCatalogSpark33.class.getName(), catalogClass);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,7 @@ public class SparkPaimonCatalogFilesystemBackendIT33 extends SparkPaimonCatalogF
@Test
void testCatalogClassName() {
String catalogClass =
getSparkSession()
.sessionState()
.conf()
.getConfString("spark.sql.catalog." + getCatalogName());
getSparkSession().sparkContext().conf().get("spark.sql.catalog." + getCatalogName());
Assertions.assertEquals(GravitinoPaimonCatalogSpark33.class.getName(), catalogClass);
}
}
12 changes: 10 additions & 2 deletions spark-connector/v3.4/spark/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ dependencies {
}
compileOnly(project(":clients:client-java-runtime", configuration = "shadow"))
compileOnly("org.apache.iceberg:iceberg-spark-runtime-${sparkMajorVersion}_$scalaVersion:$icebergVersion")
compileOnly("org.apache.paimon:paimon-spark-$sparkMajorVersion:$paimonVersion")
compileOnly("org.apache.paimon:paimon-spark-$sparkMajorVersion:$paimonVersion") {
exclude("org.apache.spark")
}

testImplementation(project(":api")) {
exclude("org.apache.logging.log4j")
Expand Down Expand Up @@ -124,7 +126,9 @@ dependencies {
testImplementation("org.apache.iceberg:iceberg-core:$icebergVersion")
testImplementation("org.apache.iceberg:iceberg-spark-runtime-${sparkMajorVersion}_$scalaVersion:$icebergVersion")
testImplementation("org.apache.iceberg:iceberg-hive-metastore:$icebergVersion")
testImplementation("org.apache.paimon:paimon-spark-$sparkMajorVersion:$paimonVersion")
testImplementation("org.apache.paimon:paimon-spark-$sparkMajorVersion:$paimonVersion") {
exclude("org.apache.spark")
}
testImplementation("org.apache.kyuubi:kyuubi-spark-connector-hive_$scalaVersion:$kyuubiVersion")
// include spark-sql,spark-catalyst,hive-common,hdfs-client
testImplementation("org.apache.spark:spark-hive_$scalaVersion:$sparkVersion") {
Expand All @@ -137,6 +141,9 @@ dependencies {
exclude("com.fasterxml.jackson.core")
}
testImplementation("org.scala-lang.modules:scala-collection-compat_$scalaVersion:$scalaCollectionCompatVersion")
testImplementation("org.apache.spark:spark-catalyst_$scalaVersion:$sparkVersion")
testImplementation("org.apache.spark:spark-core_$scalaVersion:$sparkVersion")
testImplementation("org.apache.spark:spark-sql_$scalaVersion:$sparkVersion")

testRuntimeOnly(libs.junit.jupiter.engine)
}
Expand All @@ -155,6 +162,7 @@ tasks.test {
dependsOn(":catalogs:catalog-lakehouse-iceberg:jar")
dependsOn(":catalogs:catalog-hive:jar")
dependsOn(":iceberg:iceberg-rest-server:jar")
dependsOn(":catalogs:catalog-lakehouse-paimon:jar")
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,7 @@ public class SparkHiveCatalogIT34 extends SparkHiveCatalogIT {
@Test
void testCatalogClassName() {
String catalogClass =
getSparkSession()
.sessionState()
.conf()
.getConfString("spark.sql.catalog." + getCatalogName());
getSparkSession().sparkContext().conf().get("spark.sql.catalog." + getCatalogName());
Assertions.assertEquals(GravitinoHiveCatalogSpark34.class.getName(), catalogClass);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,7 @@ public class SparkIcebergCatalogHiveBackendIT34 extends SparkIcebergCatalogHiveB
@Test
void testCatalogClassName() {
String catalogClass =
getSparkSession()
.sessionState()
.conf()
.getConfString("spark.sql.catalog." + getCatalogName());
getSparkSession().sparkContext().conf().get("spark.sql.catalog." + getCatalogName());
Assertions.assertEquals(GravitinoIcebergCatalogSpark34.class.getName(), catalogClass);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,7 @@ public class SparkPaimonCatalogFilesystemBackendIT34 extends SparkPaimonCatalogF
@Test
void testCatalogClassName() {
String catalogClass =
getSparkSession()
.sessionState()
.conf()
.getConfString("spark.sql.catalog." + getCatalogName());
getSparkSession().sparkContext().conf().get("spark.sql.catalog." + getCatalogName());
Assertions.assertEquals(GravitinoPaimonCatalogSpark34.class.getName(), catalogClass);
}
}
12 changes: 10 additions & 2 deletions spark-connector/v3.5/spark/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ dependencies {
}
compileOnly(project(":clients:client-java-runtime", configuration = "shadow"))
compileOnly("org.apache.iceberg:iceberg-spark-runtime-${sparkMajorVersion}_$scalaVersion:$icebergVersion")
compileOnly("org.apache.paimon:paimon-spark-$sparkMajorVersion:$paimonVersion")
compileOnly("org.apache.paimon:paimon-spark-$sparkMajorVersion:$paimonVersion") {
exclude("org.apache.spark")
}

testImplementation(project(":api")) {
exclude("org.apache.logging.log4j")
Expand Down Expand Up @@ -126,7 +128,9 @@ dependencies {
testImplementation("org.apache.iceberg:iceberg-core:$icebergVersion")
testImplementation("org.apache.iceberg:iceberg-spark-runtime-${sparkMajorVersion}_$scalaVersion:$icebergVersion")
testImplementation("org.apache.iceberg:iceberg-hive-metastore:$icebergVersion")
testImplementation("org.apache.paimon:paimon-spark-$sparkMajorVersion:$paimonVersion")
testImplementation("org.apache.paimon:paimon-spark-$sparkMajorVersion:$paimonVersion") {
exclude("org.apache.spark")
}
testImplementation("org.apache.kyuubi:kyuubi-spark-connector-hive_$scalaVersion:$kyuubiVersion")
// include spark-sql,spark-catalyst,hive-common,hdfs-client
testImplementation("org.apache.spark:spark-hive_$scalaVersion:$sparkVersion") {
Expand All @@ -139,6 +143,9 @@ dependencies {
exclude("com.fasterxml.jackson.core")
}
testImplementation("org.scala-lang.modules:scala-collection-compat_$scalaVersion:$scalaCollectionCompatVersion")
testImplementation("org.apache.spark:spark-catalyst_$scalaVersion:$sparkVersion")
testImplementation("org.apache.spark:spark-core_$scalaVersion:$sparkVersion")
testImplementation("org.apache.spark:spark-sql_$scalaVersion:$sparkVersion")

testRuntimeOnly(libs.junit.jupiter.engine)
}
Expand All @@ -157,6 +164,7 @@ tasks.test {
dependsOn(":catalogs:catalog-lakehouse-iceberg:jar")
dependsOn(":catalogs:catalog-hive:jar")
dependsOn(":iceberg:iceberg-rest-server:jar")
dependsOn(":catalogs:catalog-lakehouse-paimon:jar")
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,7 @@ public class SparkHiveCatalogIT35 extends SparkHiveCatalogIT {
@Test
void testCatalogClassName() {
String catalogClass =
getSparkSession()
.sessionState()
.conf()
.getConfString("spark.sql.catalog." + getCatalogName());
getSparkSession().sparkContext().conf().get("spark.sql.catalog." + getCatalogName());
Assertions.assertEquals(GravitinoHiveCatalogSpark35.class.getName(), catalogClass);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,7 @@ public class SparkIcebergCatalogHiveBackendIT35 extends SparkIcebergCatalogHiveB
@Test
void testCatalogClassName() {
String catalogClass =
getSparkSession()
.sessionState()
.conf()
.getConfString("spark.sql.catalog." + getCatalogName());
getSparkSession().sparkContext().conf().get("spark.sql.catalog." + getCatalogName());
Assertions.assertEquals(GravitinoIcebergCatalogSpark35.class.getName(), catalogClass);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,7 @@ public class SparkPaimonCatalogFilesystemBackendIT35 extends SparkPaimonCatalogF
@Test
void testCatalogClassName() {
String catalogClass =
getSparkSession()
.sessionState()
.conf()
.getConfString("spark.sql.catalog." + getCatalogName());
getSparkSession().sparkContext().conf().get("spark.sql.catalog." + getCatalogName());
Assertions.assertEquals(GravitinoIcebergCatalogSpark35.class.getName(), catalogClass);
}
}

0 comments on commit 659338f

Please sign in to comment.