-
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.
[#3193] feat(spark-connector): Support Iceberg RestCatalog in spark-c…
…onnector (#3194) ### What changes were proposed in this pull request? Support Iceberg `RestCatalog` in spark-connector. Add IT for Iceberg `RestCatalog` with HiveCatalog backend. ### Why are the changes needed? without this, spark-connector does not support Iceberg `RestCatalog` Fix: #3193 ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? New ITs.
- Loading branch information
Showing
7 changed files
with
154 additions
and
4 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
31 changes: 31 additions & 0 deletions
31
...datastrato/gravitino/integration/test/spark/iceberg/SparkIcebergCatalogRestBackendIT.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,31 @@ | ||
/* | ||
* Copyright 2024 Datastrato Pvt Ltd. | ||
* This software is licensed under the Apache License version 2. | ||
*/ | ||
package com.datastrato.gravitino.integration.test.spark.iceberg; | ||
|
||
import com.datastrato.gravitino.spark.connector.iceberg.IcebergPropertiesConstants; | ||
import com.google.common.collect.Maps; | ||
import java.util.Map; | ||
import org.junit.jupiter.api.Tag; | ||
import org.junit.jupiter.api.TestInstance; | ||
|
||
/** This class use Iceberg RESTCatalog for test, and the real backend catalog is HiveCatalog. */ | ||
@Tag("gravitino-docker-it") | ||
@TestInstance(TestInstance.Lifecycle.PER_CLASS) | ||
public class SparkIcebergCatalogRestBackendIT extends SparkIcebergCatalogIT { | ||
|
||
@Override | ||
protected Map<String, String> getCatalogConfigs() { | ||
Map<String, String> catalogProperties = Maps.newHashMap(); | ||
catalogProperties.put( | ||
IcebergPropertiesConstants.GRAVITINO_ICEBERG_CATALOG_BACKEND, | ||
IcebergPropertiesConstants.ICEBERG_CATALOG_BACKEND_REST); | ||
catalogProperties.put( | ||
IcebergPropertiesConstants.GRAVITINO_ICEBERG_CATALOG_URI, icebergRestServiceUri); | ||
catalogProperties.put( | ||
IcebergPropertiesConstants.GRAVITINO_ICEBERG_CATALOG_WAREHOUSE, warehouse); | ||
|
||
return catalogProperties; | ||
} | ||
} |
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