This is an automated email from the ASF dual-hosted git repository. yuqi4733 pushed a commit to branch branch-0.8 in repository https://gitbox.apache.org/repos/asf/gravitino.git
The following commit(s) were added to refs/heads/branch-0.8 by this push: new e51ac9f571 [#6649] feat(iceberg): make warehouse configable for Iceberg memory catalog backend (#6674) e51ac9f571 is described below commit e51ac9f571bd4cd2e6e2a52963a6f7e8edf32096 Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> AuthorDate: Tue Mar 11 21:29:29 2025 +0800 [#6649] feat(iceberg): make warehouse configable for Iceberg memory catalog backend (#6674) <!-- 1. Title: [#<issue>] <type>(<scope>): <subject> Examples: - "[#123] feat(operator): support xxx" - "[#233] fix: check null before access result in xxx" - "[MINOR] refactor: fix typo in variable name" - "[MINOR] docs: fix typo in README" - "[#255] test: fix flaky test NameOfTheTest" Reference: https://www.conventionalcommits.org/en/v1.0.0/ 2. If the PR is unfinished, please mark this PR as draft. --> ### 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 Co-authored-by: FANNG <xiaoj...@datastrato.com> --- .../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; }