This is an automated email from the ASF dual-hosted git repository. jshao pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/gravitino.git
The following commit(s) were added to refs/heads/main by this push: new c934958f02 [#6649] feat(iceberg): make warehouse configable for Iceberg memory catalog backend (#6658) c934958f02 is described below commit c934958f021f5341058d8b32f467cd8a10109817 Author: FANNG <xiaoj...@datastrato.com> AuthorDate: Tue Mar 11 19:30:19 2025 +0800 [#6649] feat(iceberg): make warehouse configable for Iceberg memory catalog backend (#6658) ### What changes were proposed in this pull request? The warehouse location for Iceberg memory catalog backend is hard coded to '/tmp', make it configurable. ### Why are the changes needed? Fix: #6649 ### Does this PR introduce _any_ user-facing change? no ### How was this patch tested? test it whether works for S3 and local storage --- .../org/apache/gravitino/iceberg/common/utils/IcebergCatalogUtil.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/iceberg/iceberg-common/src/main/java/org/apache/gravitino/iceberg/common/utils/IcebergCatalogUtil.java b/iceberg/iceberg-common/src/main/java/org/apache/gravitino/iceberg/common/utils/IcebergCatalogUtil.java index c88212e2c6..77f8b9a22b 100644 --- a/iceberg/iceberg-common/src/main/java/org/apache/gravitino/iceberg/common/utils/IcebergCatalogUtil.java +++ b/iceberg/iceberg-common/src/main/java/org/apache/gravitino/iceberg/common/utils/IcebergCatalogUtil.java @@ -59,7 +59,9 @@ public class IcebergCatalogUtil { String icebergCatalogName = icebergConfig.getCatalogBackendName(); InMemoryCatalog memoryCatalog = new InMemoryCatalog(); Map<String, String> resultProperties = icebergConfig.getIcebergCatalogProperties(); - resultProperties.put(CatalogProperties.WAREHOUSE_LOCATION, "/tmp"); + if (!resultProperties.containsKey(IcebergConstants.WAREHOUSE)) { + resultProperties.put(IcebergConstants.WAREHOUSE, "/tmp"); + } memoryCatalog.initialize(icebergCatalogName, resultProperties); return memoryCatalog; }