Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,6 @@ def get_instance(cls):
"texera_iceberg",
StorageConfig.ICEBERG_REST_CATALOG_WAREHOUSE_NAME,
StorageConfig.ICEBERG_REST_CATALOG_URI,
StorageConfig.S3_ENDPOINT,
StorageConfig.S3_REGION,
StorageConfig.S3_AUTH_USERNAME,
StorageConfig.S3_AUTH_PASSWORD,
)
else:
raise ValueError(f"Unsupported catalog type: {catalog_type}")
Expand Down
17 changes: 2 additions & 15 deletions amber/src/main/python/core/storage/iceberg/iceberg_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,23 +157,15 @@ def create_rest_catalog(
catalog_name: str,
warehouse_name: str,
rest_uri: str,
s3_endpoint: str,
s3_region: str,
s3_username: str,
s3_password: str,
) -> Catalog:
"""
Creates a REST catalog instance by connecting to a REST endpoint.
- Configures the catalog to interact with a REST endpoint.
- The warehouse_name parameter specifies the warehouse identifier.
- Configures S3FileIO for MinIO/S3 storage backend.
- S3 settings (endpoint, region, credentials) are supplied by the REST
catalog server at runtime.
:param catalog_name: the name of the catalog.
:param warehouse_name: the warehouse identifier.
:param rest_uri: the URI of the REST catalog endpoint.
:param s3_endpoint: the S3 endpoint URL.
:param s3_region: the S3 region.
:param s3_username: the S3 access key ID.
:param s3_password: the S3 secret access key.
:return: a Catalog instance (REST catalog).
"""
return load_catalog(
Expand All @@ -182,11 +174,6 @@ def create_rest_catalog(
"type": "rest",
"uri": rest_uri,
"warehouse": warehouse_name,
"s3.endpoint": s3_endpoint,
"s3.access-key-id": s3_username,
"s3.secret-access-key": s3_password,
"s3.region": s3_region,
"s3.path-style-access": "true",
},
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,19 +108,12 @@ object IcebergUtil {
): RESTCatalog = {
val catalog = new RESTCatalog()

// Build base properties map
var properties = Map(
// S3 settings (endpoint, region, credentials) are supplied by the REST
// catalog server at runtime.
val properties = Map(
"warehouse" -> warehouse,
CatalogProperties.URI -> StorageConfig.icebergRESTCatalogUri
)

properties = properties ++ Map(
CatalogProperties.FILE_IO_IMPL -> classOf[S3FileIO].getName,
"s3.endpoint" -> StorageConfig.s3Endpoint,
"s3.access-key-id" -> StorageConfig.s3Username,
"s3.secret-access-key" -> StorageConfig.s3Password,
"s3.region" -> StorageConfig.s3Region,
"s3.path-style-access" -> "true"
CatalogProperties.URI -> StorageConfig.icebergRESTCatalogUri,
CatalogProperties.FILE_IO_IMPL -> classOf[S3FileIO].getName
)

catalog.initialize(catalogName, properties.asJava)
Expand Down
Loading