Skip to content

Commit e51ac9f

Browse files
[#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 <xiaojing@datastrato.com>
1 parent 92600c6 commit e51ac9f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

iceberg/iceberg-common/src/main/java/org/apache/gravitino/iceberg/common/utils/IcebergCatalogUtil.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ private static InMemoryCatalog loadMemoryCatalog(IcebergConfig icebergConfig) {
5959
String icebergCatalogName = icebergConfig.getCatalogBackendName();
6060
InMemoryCatalog memoryCatalog = new InMemoryCatalog();
6161
Map<String, String> resultProperties = icebergConfig.getIcebergCatalogProperties();
62-
resultProperties.put(CatalogProperties.WAREHOUSE_LOCATION, "/tmp");
62+
if (!resultProperties.containsKey(IcebergConstants.WAREHOUSE)) {
63+
resultProperties.put(IcebergConstants.WAREHOUSE, "/tmp");
64+
}
6365
memoryCatalog.initialize(icebergCatalogName, resultProperties);
6466
return memoryCatalog;
6567
}

0 commit comments

Comments
 (0)