Skip to content

Commit c934958

Browse files
authored
[#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
1 parent 78c0114 commit c934958

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)