You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@polaris.apache.org by di...@apache.org on 2026/06/12 17:35:39 UTC
(polaris) branch main updated: Rename IcebergCatalog to LocalIcebergCatalog (#4672)
This is an automated email from the ASF dual-hosted git repository.
dimas-b pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/polaris.git
The following commit(s) were added to refs/heads/main by this push:
new 7212e59af8 Rename IcebergCatalog to LocalIcebergCatalog (#4672)
7212e59af8 is described below
commit 7212e59af8e39be1d5c122cab9c3daff43af88c5
Author: Dmitri Bourlatchkov <dm...@gmail.com>
AuthorDate: Fri Jun 12 13:35:34 2026 -0400
Rename IcebergCatalog to LocalIcebergCatalog (#4672)
* This rename is to enhance clarity by distinguishing this class from "remote" and/or "federated" catalogs.
* Also rename related test classes
---
LICENSE | 2 +-
.../catalog/iceberg/IcebergCatalogHandler.java | 17 +--
...cebergCatalog.java => LocalIcebergCatalog.java} | 22 ++--
.../catalog/PolarisLocalCatalogFactory.java | 6 +-
.../service/admin/PolarisAuthzTestBase.java | 6 +-
.../AbstractPolarisGenericTableCatalogTest.java | 6 +-
...t.java => AbstractLocalIcebergCatalogTest.java} | 117 +++++++++++----------
...va => AbstractLocalIcebergCatalogViewTest.java} | 11 +-
.../catalog/iceberg/IcebergCatalogHandlerTest.java | 4 +-
...java => LocalIcebergCatalogNoSqlInMemTest.java} | 6 +-
...java => LocalIcebergCatalogRelationalTest.java} | 4 +-
...talogTest.java => LocalIcebergCatalogTest.java} | 6 +-
... => LocalIcebergViewCatalogNoSqlInMemTest.java} | 6 +-
... => LocalIcebergViewCatalogRelationalTest.java} | 4 +-
.../service/catalog/io/FileIOFactoryTest.java | 12 +--
.../catalog/policy/AbstractPolicyCatalogTest.java | 6 +-
...rsistenceDistCacheInvalidationsIntegration.java | 4 +-
17 files changed, 122 insertions(+), 117 deletions(-)
diff --git a/LICENSE b/LICENSE
index d1093d5c1d..fa2c89bfe6 100644
--- a/LICENSE
+++ b/LICENSE
@@ -218,7 +218,7 @@ This product includes code from Apache Iceberg.
* spec/iceberg-rest-catalog-open-api.yaml
* spec/polaris-catalog-apis/oauth-tokens-api.yaml
* integration-tests/src/main/java/org/apache/polaris/service/it/test/PolarisRestCatalogIntegrationBase.java
-* runtime/service/src/main/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalog.java
+* runtime/service/src/main/java/org/apache/polaris/service/catalog/iceberg/LocalIcebergCatalog.java
* runtime/service/src/main/java/org/apache/polaris/service/catalog/iceberg/CatalogHandlerUtils.java
* plugins/spark/common/src/main/java/org/apache/polaris/spark/PolarisRESTCatalog.java
* plugins/spark/v3.5/spark/src/main/java/org/apache/polaris/spark/SparkCatalog.java
diff --git a/runtime/service/src/main/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalogHandler.java b/runtime/service/src/main/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalogHandler.java
index 7e778c08fd..46d33faa93 100644
--- a/runtime/service/src/main/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalogHandler.java
+++ b/runtime/service/src/main/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalogHandler.java
@@ -309,7 +309,7 @@ public abstract class IcebergCatalogHandler extends CatalogHandler implements Au
return catalogHandlerUtils().listNamespaces(namespaceCatalog, parent, pageToken, pageSize);
} else {
PageToken pageRequest = PageToken.build(pageToken, pageSize, this::shouldDecodeToken);
- var results = ((IcebergCatalog) baseCatalog).listNamespaces(parent, pageRequest);
+ var results = ((LocalIcebergCatalog) baseCatalog).listNamespaces(parent, pageRequest);
return ListNamespacesResponse.builder()
.addAll(results.items())
.nextPageToken(results.encodedResponseToken())
@@ -400,7 +400,7 @@ public abstract class IcebergCatalogHandler extends CatalogHandler implements Au
return catalogHandlerUtils().listTables(baseCatalog, namespace, pageToken, pageSize);
} else {
PageToken pageRequest = PageToken.build(pageToken, pageSize, this::shouldDecodeToken);
- var results = ((IcebergCatalog) baseCatalog).listTables(namespace, pageRequest);
+ var results = ((LocalIcebergCatalog) baseCatalog).listTables(namespace, pageRequest);
return ListTablesResponse.builder()
.addAll(results.items())
.nextPageToken(results.encodedResponseToken())
@@ -527,7 +527,8 @@ public abstract class IcebergCatalogHandler extends CatalogHandler implements Au
location = request.location();
} else {
location =
- ((IcebergCatalog) baseCatalog).transformTableLikeLocation(ident, request.location());
+ ((LocalIcebergCatalog) baseCatalog)
+ .transformTableLikeLocation(ident, request.location());
}
} else {
location =
@@ -593,7 +594,7 @@ public abstract class IcebergCatalogHandler extends CatalogHandler implements Au
TableIdentifier ident = TableIdentifier.of(namespace, request.name());
TableMetadata metadata = stageTableCreateHelper(namespace, request);
- if (baseCatalog instanceof IcebergCatalog polarisCatalog) {
+ if (baseCatalog instanceof LocalIcebergCatalog polarisCatalog) {
polarisCatalog.validateStagedTableCreate(ident, metadata);
}
@@ -803,7 +804,7 @@ public abstract class IcebergCatalogHandler extends CatalogHandler implements Au
// the remote catalog's actual table metadata.
// Note: this check must come after authorizeLoadTable because baseCatalog is
// initialized lazily during authorization.
- if (!(baseCatalog instanceof IcebergCatalog)) {
+ if (!(baseCatalog instanceof LocalIcebergCatalog)) {
return fallbackToFullLoadTable(tableIdentifier, refreshCredentialsEndpoint);
}
@@ -1096,7 +1097,7 @@ public abstract class IcebergCatalogHandler extends CatalogHandler implements Au
if (!isFederated && update instanceof MetadataUpdate.SetLocation setLocation) {
String requestedLocation = setLocation.location();
String filteredLocation =
- ((IcebergCatalog) baseCatalog)
+ ((LocalIcebergCatalog) baseCatalog)
.transformTableLikeLocation(identifier, requestedLocation);
return new MetadataUpdate.SetLocation(filteredLocation);
} else {
@@ -1210,7 +1211,7 @@ public abstract class IcebergCatalogHandler extends CatalogHandler implements Au
// validations.
TransactionWorkspaceMetaStoreManager transactionMetaStoreManager =
new TransactionWorkspaceMetaStoreManager(diagnostics(), metaStoreManager());
- ((IcebergCatalog) baseCatalog).setMetaStoreManager(transactionMetaStoreManager);
+ ((LocalIcebergCatalog) baseCatalog).setMetaStoreManager(transactionMetaStoreManager);
// Group all changes by table identifier to handle them atomically.
// This prevents conflicts when multiple changes target the same table entity.
@@ -1318,7 +1319,7 @@ public abstract class IcebergCatalogHandler extends CatalogHandler implements Au
baseCatalog.getClass().getName());
} else {
PageToken pageRequest = PageToken.build(pageToken, pageSize, this::shouldDecodeToken);
- var results = ((IcebergCatalog) baseCatalog).listViews(namespace, pageRequest);
+ var results = ((LocalIcebergCatalog) baseCatalog).listViews(namespace, pageRequest);
return ListTablesResponse.builder()
.addAll(results.items())
.nextPageToken(results.encodedResponseToken())
diff --git a/runtime/service/src/main/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalog.java b/runtime/service/src/main/java/org/apache/polaris/service/catalog/iceberg/LocalIcebergCatalog.java
similarity index 99%
rename from runtime/service/src/main/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalog.java
rename to runtime/service/src/main/java/org/apache/polaris/service/catalog/iceberg/LocalIcebergCatalog.java
index 239096cf4f..446ce2e553 100644
--- a/runtime/service/src/main/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalog.java
+++ b/runtime/service/src/main/java/org/apache/polaris/service/catalog/iceberg/LocalIcebergCatalog.java
@@ -151,9 +151,9 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/** Defines the relationship between PolarisEntities and Iceberg's business logic. */
-public class IcebergCatalog extends BaseMetastoreViewCatalog
+public class LocalIcebergCatalog extends BaseMetastoreViewCatalog
implements SupportsNamespaces, SupportsNotifications, Closeable {
- private static final Logger LOGGER = LoggerFactory.getLogger(IcebergCatalog.class);
+ private static final Logger LOGGER = LoggerFactory.getLogger(LocalIcebergCatalog.class);
private static final Joiner SLASH = Joiner.on("/");
@@ -202,7 +202,7 @@ public class IcebergCatalog extends BaseMetastoreViewCatalog
* this catalog instance only interacts with authorized resolved paths.
* @param taskExecutor Executor we use to register cleanup task handlers
*/
- public IcebergCatalog(
+ public LocalIcebergCatalog(
PolarisDiagnostics diagnostics,
ResolverFactory resolverFactory,
PolarisMetaStoreManager metaStoreManager,
@@ -688,7 +688,7 @@ public class IcebergCatalog extends BaseMetastoreViewCatalog
.reversed()
.stream()
.map(entity -> baseLocation(diagnostics, entity))
- .map(IcebergCatalog::stripLeadingTrailingSlash)
+ .map(LocalIcebergCatalog::stripLeadingTrailingSlash)
.collect(Collectors.joining("/"));
}
@@ -1509,7 +1509,8 @@ public class IcebergCatalog extends BaseMetastoreViewCatalog
public PolarisIcebergCatalogViewBuilder(TableIdentifier identifier) {
super(identifier);
withProperties(
- PropertyUtil.propertiesWithPrefix(IcebergCatalog.this.properties(), "table-default."));
+ PropertyUtil.propertiesWithPrefix(
+ LocalIcebergCatalog.this.properties(), "table-default."));
this.identifier = identifier;
}
@@ -1520,8 +1521,8 @@ public class IcebergCatalog extends BaseMetastoreViewCatalog
}
/**
- * An implementation of {@link TableOperations} that integrates with {@link IcebergCatalog}. Much
- * of this code was originally copied from {@link
+ * An implementation of {@link TableOperations} that integrates with {@link LocalIcebergCatalog}.
+ * Much of this code was originally copied from {@link
* org.apache.iceberg.BaseMetastoreTableOperations}. CODE_COPIED_TO_POLARIS From Apache Iceberg
* Version: 1.8
*/
@@ -1984,9 +1985,10 @@ public class IcebergCatalog extends BaseMetastoreViewCatalog
}
/**
- * An implementation of {@link ViewOperations} that integrates with {@link IcebergCatalog}. Much
- * of this code was originally copied from {@link org.apache.iceberg.view.BaseViewOperations}.
- * CODE_COPIED_TO_POLARIS From Apache Iceberg Version: 1.8
+ * An implementation of {@link ViewOperations} that integrates with {@link LocalIcebergCatalog}.
+ * Much of this code was originally copied from {@link
+ * org.apache.iceberg.view.BaseViewOperations}. CODE_COPIED_TO_POLARIS From Apache Iceberg
+ * Version: 1.8
*/
private class BasePolarisViewOperations extends PolarisOperationsBase<ViewMetadata>
implements ViewOperations {
diff --git a/runtime/service/src/main/java/org/apache/polaris/service/context/catalog/PolarisLocalCatalogFactory.java b/runtime/service/src/main/java/org/apache/polaris/service/context/catalog/PolarisLocalCatalogFactory.java
index 8f1343c9bf..a170b6e540 100644
--- a/runtime/service/src/main/java/org/apache/polaris/service/context/catalog/PolarisLocalCatalogFactory.java
+++ b/runtime/service/src/main/java/org/apache/polaris/service/context/catalog/PolarisLocalCatalogFactory.java
@@ -32,7 +32,7 @@ import org.apache.polaris.core.entity.CatalogEntity;
import org.apache.polaris.core.persistence.PolarisMetaStoreManager;
import org.apache.polaris.core.persistence.resolver.PolarisResolutionManifest;
import org.apache.polaris.core.persistence.resolver.ResolverFactory;
-import org.apache.polaris.service.catalog.iceberg.IcebergCatalog;
+import org.apache.polaris.service.catalog.iceberg.LocalIcebergCatalog;
import org.apache.polaris.service.catalog.io.FileIOFactory;
import org.apache.polaris.service.catalog.io.StorageAccessConfigProvider;
import org.apache.polaris.service.events.PolarisEventDispatcher;
@@ -89,8 +89,8 @@ public class PolarisLocalCatalogFactory implements LocalCatalogFactory {
String catalogKey = realm + "/" + catalogName;
LOGGER.debug("Initializing new BasePolarisCatalog for key: {}", catalogKey);
- IcebergCatalog catalogInstance =
- new IcebergCatalog(
+ LocalIcebergCatalog catalogInstance =
+ new LocalIcebergCatalog(
diagnostics,
resolverFactory,
metaStoreManager,
diff --git a/runtime/service/src/test/java/org/apache/polaris/service/admin/PolarisAuthzTestBase.java b/runtime/service/src/test/java/org/apache/polaris/service/admin/PolarisAuthzTestBase.java
index b5cc15d65e..23dd67f428 100644
--- a/runtime/service/src/test/java/org/apache/polaris/service/admin/PolarisAuthzTestBase.java
+++ b/runtime/service/src/test/java/org/apache/polaris/service/admin/PolarisAuthzTestBase.java
@@ -76,7 +76,7 @@ import org.apache.polaris.core.storage.cache.StorageCredentialCache;
import org.apache.polaris.service.catalog.PolarisPassthroughResolutionView;
import org.apache.polaris.service.catalog.Profiles;
import org.apache.polaris.service.catalog.generic.PolarisGenericTableCatalog;
-import org.apache.polaris.service.catalog.iceberg.IcebergCatalog;
+import org.apache.polaris.service.catalog.iceberg.LocalIcebergCatalog;
import org.apache.polaris.service.catalog.io.FileIOFactory;
import org.apache.polaris.service.catalog.io.StorageAccessConfigProvider;
import org.apache.polaris.service.catalog.policy.PolicyCatalog;
@@ -197,7 +197,7 @@ public abstract class PolarisAuthzTestBase {
@Inject protected RealmContextHolder realmContextHolder;
@Inject protected PolarisEventDispatcher polarisEventDispatcher;
- protected IcebergCatalog baseCatalog;
+ protected LocalIcebergCatalog baseCatalog;
protected PolarisGenericTableCatalog genericTableCatalog;
protected PolicyCatalog policyCatalog;
protected PolarisAdminService adminService;
@@ -479,7 +479,7 @@ public abstract class PolarisAuthzTestBase {
new PolarisPassthroughResolutionView(
resolutionManifestFactory, authenticatedRoot, CATALOG_NAME);
this.baseCatalog =
- new IcebergCatalog(
+ new LocalIcebergCatalog(
diagServices,
resolverFactory,
metaStoreManager,
diff --git a/runtime/service/src/test/java/org/apache/polaris/service/catalog/generic/AbstractPolarisGenericTableCatalogTest.java b/runtime/service/src/test/java/org/apache/polaris/service/catalog/generic/AbstractPolarisGenericTableCatalogTest.java
index 3618e01347..dc657387bf 100644
--- a/runtime/service/src/test/java/org/apache/polaris/service/catalog/generic/AbstractPolarisGenericTableCatalogTest.java
+++ b/runtime/service/src/test/java/org/apache/polaris/service/catalog/generic/AbstractPolarisGenericTableCatalogTest.java
@@ -62,7 +62,7 @@ import org.apache.polaris.core.storage.aws.AwsStorageConfigurationInfo;
import org.apache.polaris.core.storage.cache.StorageCredentialCache;
import org.apache.polaris.service.admin.PolarisAdminService;
import org.apache.polaris.service.catalog.PolarisPassthroughResolutionView;
-import org.apache.polaris.service.catalog.iceberg.IcebergCatalog;
+import org.apache.polaris.service.catalog.iceberg.LocalIcebergCatalog;
import org.apache.polaris.service.catalog.io.FileIOFactory;
import org.apache.polaris.service.catalog.io.StorageAccessConfigProvider;
import org.apache.polaris.service.config.ReservedProperties;
@@ -111,7 +111,7 @@ public abstract class AbstractPolarisGenericTableCatalogTest {
@Inject PolarisPrincipalHolder polarisPrincipalHolder;
private PolarisGenericTableCatalog genericTableCatalog;
- private IcebergCatalog icebergCatalog;
+ private LocalIcebergCatalog icebergCatalog;
private AwsStorageConfigInfo storageConfigModel;
private String realmName;
private PolarisCallContext polarisContext;
@@ -227,7 +227,7 @@ public abstract class AbstractPolarisGenericTableCatalogTest {
new PolarisGenericTableCatalog(metaStoreManager, polarisContext, passthroughView);
this.genericTableCatalog.initialize(CATALOG_NAME, Map.of());
this.icebergCatalog =
- new IcebergCatalog(
+ new LocalIcebergCatalog(
diagServices,
resolverFactory,
metaStoreManager,
diff --git a/runtime/service/src/test/java/org/apache/polaris/service/catalog/iceberg/AbstractIcebergCatalogTest.java b/runtime/service/src/test/java/org/apache/polaris/service/catalog/iceberg/AbstractLocalIcebergCatalogTest.java
similarity index 97%
rename from runtime/service/src/test/java/org/apache/polaris/service/catalog/iceberg/AbstractIcebergCatalogTest.java
rename to runtime/service/src/test/java/org/apache/polaris/service/catalog/iceberg/AbstractLocalIcebergCatalogTest.java
index 3701206dd7..70f59eec0c 100644
--- a/runtime/service/src/test/java/org/apache/polaris/service/catalog/iceberg/AbstractIcebergCatalogTest.java
+++ b/runtime/service/src/test/java/org/apache/polaris/service/catalog/iceberg/AbstractLocalIcebergCatalogTest.java
@@ -186,7 +186,7 @@ import software.amazon.awssdk.services.sts.model.AssumeRoleRequest;
import software.amazon.awssdk.services.sts.model.AssumeRoleResponse;
import software.amazon.awssdk.services.sts.model.Credentials;
-public abstract class AbstractIcebergCatalogTest extends CatalogTests<IcebergCatalog> {
+public abstract class AbstractLocalIcebergCatalogTest extends CatalogTests<LocalIcebergCatalog> {
static {
org.assertj.core.api.Assumptions.setPreferredAssumptionException(
PreferredAssumptionException.JUNIT5);
@@ -261,7 +261,7 @@ public abstract class AbstractIcebergCatalogTest extends CatalogTests<IcebergCat
@Inject ResolverFactory resolverFactory;
@Inject PolarisEventDispatcher polarisEventDispatcher;
- private IcebergCatalog catalog;
+ private LocalIcebergCatalog catalog;
private String realmName;
private PolarisCallContext polarisContext;
private InMemoryFileIO fileIO;
@@ -354,7 +354,7 @@ public abstract class AbstractIcebergCatalogTest extends CatalogTests<IcebergCat
}
@Override
- protected IcebergCatalog catalog() {
+ protected LocalIcebergCatalog catalog() {
return catalog;
}
@@ -366,9 +366,9 @@ public abstract class AbstractIcebergCatalogTest extends CatalogTests<IcebergCat
* @return a configured instance of IcebergCatalog
*/
@Override
- protected IcebergCatalog initCatalog(
+ protected LocalIcebergCatalog initCatalog(
String catalogName, Map<String, String> additionalProperties) {
- IcebergCatalog icebergCatalog = newIcebergCatalog(CATALOG_NAME);
+ LocalIcebergCatalog icebergCatalog = newIcebergCatalog(CATALOG_NAME);
fileIO = new InMemoryFileIO();
icebergCatalog.setCatalogFileIo(fileIO);
ImmutableMap.Builder<String, String> propertiesBuilder =
@@ -415,22 +415,22 @@ public abstract class AbstractIcebergCatalogTest extends CatalogTests<IcebergCat
return true;
}
- protected IcebergCatalog newIcebergCatalog(String catalogName) {
+ protected LocalIcebergCatalog newIcebergCatalog(String catalogName) {
return newIcebergCatalog(catalogName, metaStoreManager);
}
- protected IcebergCatalog newIcebergCatalog(
+ protected LocalIcebergCatalog newIcebergCatalog(
String catalogName, PolarisMetaStoreManager metaStoreManager) {
return newIcebergCatalog(catalogName, metaStoreManager, fileIOFactory);
}
- protected IcebergCatalog newIcebergCatalog(
+ protected LocalIcebergCatalog newIcebergCatalog(
String catalogName, PolarisMetaStoreManager metaStoreManager, FileIOFactory fileIOFactory) {
PolarisPassthroughResolutionView passthroughView =
new PolarisPassthroughResolutionView(
resolutionManifestFactory, authenticatedRoot, catalogName);
TaskExecutor taskExecutor = Mockito.mock(TaskExecutor.class);
- return new IcebergCatalog(
+ return new LocalIcebergCatalog(
diagServices,
resolverFactory,
metaStoreManager,
@@ -446,7 +446,7 @@ public abstract class AbstractIcebergCatalogTest extends CatalogTests<IcebergCat
@Test
public void testEmptyNamespace() {
- IcebergCatalog catalog = catalog();
+ LocalIcebergCatalog catalog = catalog();
TableIdentifier tableInRootNs = TableIdentifier.of("table");
String expectedMessage = "Namespace does not exist: ''";
@@ -494,7 +494,7 @@ public abstract class AbstractIcebergCatalogTest extends CatalogTests<IcebergCat
requiresNamespaceCreate(),
"Only applicable if namespaces must be created before adding children");
- IcebergCatalog catalog = catalog();
+ LocalIcebergCatalog catalog = catalog();
catalog.createNamespace(NS);
Assertions.assertThat(catalog.tableExists(TABLE))
@@ -538,7 +538,7 @@ public abstract class AbstractIcebergCatalogTest extends CatalogTests<IcebergCat
Assumptions.assumeTrue(
supportsNestedNamespaces(), "Only applicable if nested namespaces are supoprted");
- IcebergCatalog catalog = catalog();
+ LocalIcebergCatalog catalog = catalog();
Namespace child1 = Namespace.of("parent", "child1");
@@ -549,7 +549,7 @@ public abstract class AbstractIcebergCatalogTest extends CatalogTests<IcebergCat
@Test
public void testConcurrentWritesWithRollbackNonEmptyTable() {
- IcebergCatalog catalog = this.catalog();
+ LocalIcebergCatalog catalog = this.catalog();
if (this.requiresNamespaceCreate()) {
catalog.createNamespace(NS);
}
@@ -655,7 +655,7 @@ public abstract class AbstractIcebergCatalogTest extends CatalogTests<IcebergCat
@Test
public void testConcurrentWritesWithRollbackWithNonReplaceSnapshotInBetween() {
- IcebergCatalog catalog = this.catalog();
+ LocalIcebergCatalog catalog = this.catalog();
if (this.requiresNamespaceCreate()) {
catalog.createNamespace(NS);
}
@@ -725,7 +725,7 @@ public abstract class AbstractIcebergCatalogTest extends CatalogTests<IcebergCat
@Test
public void
testConcurrentWritesWithRollbackEnableWithToRollbackSnapshotReferencedByOtherBranch() {
- IcebergCatalog catalog = this.catalog();
+ LocalIcebergCatalog catalog = this.catalog();
if (this.requiresNamespaceCreate()) {
catalog.createNamespace(NS);
}
@@ -799,7 +799,7 @@ public abstract class AbstractIcebergCatalogTest extends CatalogTests<IcebergCat
@Test
public void testConcurrentWritesWithRollbackWithConcurrentWritesToDifferentBranches() {
- IcebergCatalog catalog = this.catalog();
+ LocalIcebergCatalog catalog = this.catalog();
if (this.requiresNamespaceCreate()) {
catalog.createNamespace(NS);
}
@@ -885,7 +885,7 @@ public abstract class AbstractIcebergCatalogTest extends CatalogTests<IcebergCat
final String tableLocation = "s3://externally-owned-bucket/validate_table/";
final String tableMetadataLocation = tableLocation + "metadata/v1.metadata.json";
- IcebergCatalog catalog = catalog();
+ LocalIcebergCatalog catalog = catalog();
Namespace namespace = Namespace.of("parent", "child1");
TableIdentifier table = TableIdentifier.of(namespace, "table");
@@ -947,7 +947,7 @@ public abstract class AbstractIcebergCatalogTest extends CatalogTests<IcebergCat
// filename.
final String tableLocation = "s3://forbidden-table-location/table/";
final String tableMetadataLocation = tableLocation + "metadata/";
- IcebergCatalog catalog = catalog();
+ LocalIcebergCatalog catalog = catalog();
Namespace namespace = Namespace.of("parent", "child1");
TableIdentifier table = TableIdentifier.of(namespace, "table");
@@ -983,7 +983,8 @@ public abstract class AbstractIcebergCatalogTest extends CatalogTests<IcebergCat
final String tableLocation = "s3://externally-owned-bucket/validate_table/";
final String tableMetadataLocation = tableLocation + "metadata/";
FileIOFactory fileIOFactory = spy(this.fileIOFactory);
- IcebergCatalog catalog = newIcebergCatalog(catalog().name(), metaStoreManager, fileIOFactory);
+ LocalIcebergCatalog catalog =
+ newIcebergCatalog(catalog().name(), metaStoreManager, fileIOFactory);
catalog.initialize(
CATALOG_NAME,
ImmutableMap.of(
@@ -1021,7 +1022,7 @@ public abstract class AbstractIcebergCatalogTest extends CatalogTests<IcebergCat
final String tableLocation = "s3://externally-owned-bucket/table/";
final String tableMetadataLocation = tableLocation + "metadata/v1.metadata.json";
- IcebergCatalog catalog = catalog();
+ LocalIcebergCatalog catalog = catalog();
Namespace namespace = Namespace.of("parent", "child1");
TableIdentifier table = TableIdentifier.of(namespace, "table");
@@ -1065,7 +1066,7 @@ public abstract class AbstractIcebergCatalogTest extends CatalogTests<IcebergCat
// Use a spy so we can inject a concurrency error
PolarisMetaStoreManager spyMetaStore = spy(metaStoreManager);
- IcebergCatalog catalog = newIcebergCatalog(CATALOG_NAME, spyMetaStore);
+ LocalIcebergCatalog catalog = newIcebergCatalog(CATALOG_NAME, spyMetaStore);
catalog.initialize(
CATALOG_NAME,
ImmutableMap.of(
@@ -1129,7 +1130,7 @@ public abstract class AbstractIcebergCatalogTest extends CatalogTests<IcebergCat
// The location of the metadata JSON file specified in the create will be forbidden.
final String tableLocation = "s3://forbidden-table-location/table/";
final String tableMetadataLocation = tableLocation + "metadata/v1.metadata.json";
- IcebergCatalog catalog = catalog();
+ LocalIcebergCatalog catalog = catalog();
Namespace namespace = Namespace.of("parent", "child1");
TableIdentifier table = TableIdentifier.of(namespace, "table");
@@ -1181,7 +1182,7 @@ public abstract class AbstractIcebergCatalogTest extends CatalogTests<IcebergCat
.addProperty(
FeatureConfiguration.ALLOW_UNSTRUCTURED_TABLE_LOCATION.catalogConfig(), "true")
.build());
- IcebergCatalog catalog = catalog();
+ LocalIcebergCatalog catalog = catalog();
TableMetadata tableMetadata =
TableMetadata.buildFromEmpty()
.assignUUID()
@@ -1241,7 +1242,7 @@ public abstract class AbstractIcebergCatalogTest extends CatalogTests<IcebergCat
.addProperty(
FeatureConfiguration.ALLOW_UNSTRUCTURED_TABLE_LOCATION.catalogConfig(), "true")
.build());
- IcebergCatalog catalog = catalog();
+ LocalIcebergCatalog catalog = catalog();
TableMetadata tableMetadata =
TableMetadata.buildFromEmpty()
.assignUUID()
@@ -1298,7 +1299,7 @@ public abstract class AbstractIcebergCatalogTest extends CatalogTests<IcebergCat
.addProperty(
FeatureConfiguration.ALLOW_UNSTRUCTURED_TABLE_LOCATION.catalogConfig(), "true")
.build());
- IcebergCatalog catalog = catalog();
+ LocalIcebergCatalog catalog = catalog();
fileIO.addFile(
tableMetadataLocation,
@@ -1367,7 +1368,7 @@ public abstract class AbstractIcebergCatalogTest extends CatalogTests<IcebergCat
.build()
.asCatalog(serviceIdentityProvider)));
- IcebergCatalog catalog = newIcebergCatalog(catalogWithoutStorage);
+ LocalIcebergCatalog catalog = newIcebergCatalog(catalogWithoutStorage);
catalog.initialize(
catalogWithoutStorage,
ImmutableMap.of(
@@ -1417,7 +1418,7 @@ public abstract class AbstractIcebergCatalogTest extends CatalogTests<IcebergCat
.build()
.asCatalog(serviceIdentityProvider)));
- IcebergCatalog catalog = newIcebergCatalog(catalogName);
+ LocalIcebergCatalog catalog = newIcebergCatalog(catalogName);
catalog.initialize(
catalogName,
ImmutableMap.of(
@@ -1482,7 +1483,7 @@ public abstract class AbstractIcebergCatalogTest extends CatalogTests<IcebergCat
final String tableLocation = "s3://externally-owned-bucket/table/";
final String tableMetadataLocation = tableLocation + "metadata/v1.metadata.json";
- IcebergCatalog catalog = catalog();
+ LocalIcebergCatalog catalog = catalog();
Namespace namespace = Namespace.of("parent", "child1");
@@ -1526,7 +1527,7 @@ public abstract class AbstractIcebergCatalogTest extends CatalogTests<IcebergCat
final String tableLocation = "s3://externally-owned-bucket/table/";
final String tableMetadataLocation = tableLocation + "metadata/v1.metadata.json";
- IcebergCatalog catalog = catalog();
+ LocalIcebergCatalog catalog = catalog();
Namespace namespace = Namespace.of("parent", "child1");
@@ -1577,7 +1578,7 @@ public abstract class AbstractIcebergCatalogTest extends CatalogTests<IcebergCat
// The location of the metadata JSON file specified in the update will be forbidden.
final String tableLocation = "s3://forbidden-table-location/table/";
final String tableMetadataLocation = tableLocation + "metadata/v1.metadata.json";
- IcebergCatalog catalog = catalog();
+ LocalIcebergCatalog catalog = catalog();
Namespace namespace = Namespace.of("parent", "child1");
@@ -1621,7 +1622,7 @@ public abstract class AbstractIcebergCatalogTest extends CatalogTests<IcebergCat
final String tableLocation = "s3://externally-owned-bucket/table/";
final String tableMetadataLocation = tableLocation + "metadata/v1.metadata.json";
- IcebergCatalog catalog = catalog();
+ LocalIcebergCatalog catalog = catalog();
Namespace namespace = Namespace.of("parent", "child1");
TableIdentifier table = TableIdentifier.of(namespace, "table");
@@ -1684,7 +1685,7 @@ public abstract class AbstractIcebergCatalogTest extends CatalogTests<IcebergCat
final String tableLocation = "s3://externally-owned-bucket/table/";
final String tableMetadataLocation = tableLocation + "metadata/v1.metadata.json";
- IcebergCatalog catalog = catalog();
+ LocalIcebergCatalog catalog = catalog();
Namespace namespace = Namespace.of("parent", "child1");
@@ -1731,7 +1732,7 @@ public abstract class AbstractIcebergCatalogTest extends CatalogTests<IcebergCat
final String tableLocation = "s3://externally-owned-bucket/table/";
final String tableMetadataLocation = tableLocation + "metadata/v1.metadata.json";
- IcebergCatalog catalog = catalog();
+ LocalIcebergCatalog catalog = catalog();
Namespace namespace = Namespace.of("parent", "child1");
TableIdentifier table = TableIdentifier.of(namespace, "table");
@@ -1766,7 +1767,7 @@ public abstract class AbstractIcebergCatalogTest extends CatalogTests<IcebergCat
final String tableLocation = "s3://externally-owned-bucket/table/";
final String tableMetadataLocation = tableLocation + "metadata/v1.metadata.json";
- IcebergCatalog catalog = catalog();
+ LocalIcebergCatalog catalog = catalog();
Namespace namespace = Namespace.of("parent", "child1");
@@ -1810,7 +1811,7 @@ public abstract class AbstractIcebergCatalogTest extends CatalogTests<IcebergCat
final String tableLocation = "s3://externally-owned-bucket/table/";
final String tableMetadataLocation = tableLocation + "metadata/v1.metadata.json";
- IcebergCatalog catalog = catalog();
+ LocalIcebergCatalog catalog = catalog();
Namespace namespace = Namespace.of("parent", "child1");
@@ -1927,7 +1928,7 @@ public abstract class AbstractIcebergCatalogTest extends CatalogTests<IcebergCat
realmConfig, noPurgeStorageConfigModel, storageLocation)
.build()
.asCatalog(serviceIdentityProvider)));
- IcebergCatalog noPurgeCatalog =
+ LocalIcebergCatalog noPurgeCatalog =
newIcebergCatalog(noPurgeCatalogName, metaStoreManager, fileIOFactory);
noPurgeCatalog.initialize(
noPurgeCatalogName,
@@ -1966,7 +1967,7 @@ public abstract class AbstractIcebergCatalogTest extends CatalogTests<IcebergCat
.when(spiedManager)
.dropEntityIfExists(any(), anyList(), any(), anyMap(), anyBoolean());
- IcebergCatalog spiedCatalog = newIcebergCatalog(CATALOG_NAME, spiedManager, fileIOFactory);
+ LocalIcebergCatalog spiedCatalog = newIcebergCatalog(CATALOG_NAME, spiedManager, fileIOFactory);
spiedCatalog.initialize(
CATALOG_NAME,
ImmutableMap.of(
@@ -1991,7 +1992,7 @@ public abstract class AbstractIcebergCatalogTest extends CatalogTests<IcebergCat
.when(spiedManager)
.dropEntityIfExists(any(), anyList(), any(), anyMap(), anyBoolean());
- IcebergCatalog spiedCatalog = newIcebergCatalog(CATALOG_NAME, spiedManager, fileIOFactory);
+ LocalIcebergCatalog spiedCatalog = newIcebergCatalog(CATALOG_NAME, spiedManager, fileIOFactory);
spiedCatalog.initialize(
CATALOG_NAME,
ImmutableMap.of(
@@ -2015,7 +2016,7 @@ public abstract class AbstractIcebergCatalogTest extends CatalogTests<IcebergCat
.when(spiedManager)
.dropEntityIfExists(any(), anyList(), any(), anyMap(), anyBoolean());
- IcebergCatalog spiedCatalog = newIcebergCatalog(CATALOG_NAME, spiedManager, fileIOFactory);
+ LocalIcebergCatalog spiedCatalog = newIcebergCatalog(CATALOG_NAME, spiedManager, fileIOFactory);
spiedCatalog.initialize(
CATALOG_NAME,
ImmutableMap.of(
@@ -2044,7 +2045,7 @@ public abstract class AbstractIcebergCatalogTest extends CatalogTests<IcebergCat
.when(spiedManager)
.dropEntityIfExists(any(), anyList(), any(), anyMap(), anyBoolean());
- IcebergCatalog spiedCatalog = newIcebergCatalog(CATALOG_NAME, spiedManager, fileIOFactory);
+ LocalIcebergCatalog spiedCatalog = newIcebergCatalog(CATALOG_NAME, spiedManager, fileIOFactory);
spiedCatalog.initialize(
CATALOG_NAME,
ImmutableMap.of(
@@ -2073,7 +2074,7 @@ public abstract class AbstractIcebergCatalogTest extends CatalogTests<IcebergCat
.when(spiedManager)
.dropEntityIfExists(any(), anyList(), any(), anyMap(), anyBoolean());
- IcebergCatalog spiedCatalog = newIcebergCatalog(CATALOG_NAME, spiedManager, fileIOFactory);
+ LocalIcebergCatalog spiedCatalog = newIcebergCatalog(CATALOG_NAME, spiedManager, fileIOFactory);
spiedCatalog.initialize(
CATALOG_NAME,
ImmutableMap.of(
@@ -2094,7 +2095,7 @@ public abstract class AbstractIcebergCatalogTest extends CatalogTests<IcebergCat
.when(spiedManager)
.dropEntityIfExists(any(), anyList(), any(), anyMap(), anyBoolean());
- IcebergCatalog spiedCatalog = newIcebergCatalog(CATALOG_NAME, spiedManager, fileIOFactory);
+ LocalIcebergCatalog spiedCatalog = newIcebergCatalog(CATALOG_NAME, spiedManager, fileIOFactory);
spiedCatalog.initialize(
CATALOG_NAME,
ImmutableMap.of(
@@ -2119,7 +2120,7 @@ public abstract class AbstractIcebergCatalogTest extends CatalogTests<IcebergCat
.when(spiedManager)
.dropEntityIfExists(any(), anyList(), any(), anyMap(), anyBoolean());
- IcebergCatalog spiedCatalog = newIcebergCatalog(CATALOG_NAME, spiedManager, fileIOFactory);
+ LocalIcebergCatalog spiedCatalog = newIcebergCatalog(CATALOG_NAME, spiedManager, fileIOFactory);
spiedCatalog.initialize(
CATALOG_NAME,
ImmutableMap.of(
@@ -2138,7 +2139,7 @@ public abstract class AbstractIcebergCatalogTest extends CatalogTests<IcebergCat
.when(spiedManager)
.dropEntityIfExists(any(), anyList(), any(), anyMap(), anyBoolean());
- IcebergCatalog spiedCatalog = newIcebergCatalog(CATALOG_NAME, spiedManager, fileIOFactory);
+ LocalIcebergCatalog spiedCatalog = newIcebergCatalog(CATALOG_NAME, spiedManager, fileIOFactory);
spiedCatalog.initialize(
CATALOG_NAME,
ImmutableMap.of(
@@ -2172,7 +2173,7 @@ public abstract class AbstractIcebergCatalogTest extends CatalogTests<IcebergCat
@ParameterizedTest
@MethodSource
public void testRetriableException(Exception exception, boolean shouldRetry) {
- Assertions.assertThat(IcebergCatalog.SHOULD_RETRY_REFRESH_PREDICATE.test(exception))
+ Assertions.assertThat(LocalIcebergCatalog.SHOULD_RETRY_REFRESH_PREDICATE.test(exception))
.isEqualTo(shouldRetry);
}
@@ -2214,7 +2215,7 @@ public abstract class AbstractIcebergCatalogTest extends CatalogTests<IcebergCat
@Test
public void testFileIOWrapper() {
MeasuredFileIOFactory measured = new MeasuredFileIOFactory();
- IcebergCatalog catalog = newIcebergCatalog(CATALOG_NAME, metaStoreManager, measured);
+ LocalIcebergCatalog catalog = newIcebergCatalog(CATALOG_NAME, metaStoreManager, measured);
catalog.initialize(
CATALOG_NAME,
ImmutableMap.of(
@@ -2274,7 +2275,7 @@ public abstract class AbstractIcebergCatalogTest extends CatalogTests<IcebergCat
@Test
public void testRegisterTableWithSlashlessMetadataLocation() {
- IcebergCatalog catalog = catalog();
+ LocalIcebergCatalog catalog = catalog();
Assertions.assertThatThrownBy(
() -> catalog.registerTable(TABLE, "metadata_location_without_slashes"))
.isInstanceOf(IllegalArgumentException.class)
@@ -2283,7 +2284,7 @@ public abstract class AbstractIcebergCatalogTest extends CatalogTests<IcebergCat
@Test
public void testRegisterTableOverwriteUpdatesMetadataLocation() {
- IcebergCatalog catalog = catalog();
+ LocalIcebergCatalog catalog = catalog();
Namespace namespace = Namespace.of("register_overwrite_update");
TableIdentifier table = TableIdentifier.of(namespace, "table");
if (requiresNamespaceCreate()) {
@@ -2338,7 +2339,7 @@ public abstract class AbstractIcebergCatalogTest extends CatalogTests<IcebergCat
@Test
public void testRegisterTableOverwriteUpdatesBaseLocation() {
- IcebergCatalog catalog = catalog();
+ LocalIcebergCatalog catalog = catalog();
Namespace namespace = Namespace.of("register_overwrite_base_location");
TableIdentifier table = TableIdentifier.of(namespace, "table");
if (requiresNamespaceCreate()) {
@@ -2385,7 +2386,7 @@ public abstract class AbstractIcebergCatalogTest extends CatalogTests<IcebergCat
@Test
public void testRegisterTableOverwriteCreatesWhenMissing() {
- IcebergCatalog catalog = catalog();
+ LocalIcebergCatalog catalog = catalog();
Namespace namespace = Namespace.of("register_overwrite_create");
TableIdentifier sourceTable = TableIdentifier.of(namespace, "source_table");
TableIdentifier targetTable = TableIdentifier.of(namespace, "target_table");
@@ -2411,7 +2412,7 @@ public abstract class AbstractIcebergCatalogTest extends CatalogTests<IcebergCat
@Test
public void testRegisterTableOverwriteFalseRejectsExistingTable() {
- IcebergCatalog catalog = catalog();
+ LocalIcebergCatalog catalog = catalog();
Namespace namespace = Namespace.of("register_overwrite_conflict");
TableIdentifier table = TableIdentifier.of(namespace, "table");
if (requiresNamespaceCreate()) {
@@ -2430,7 +2431,7 @@ public abstract class AbstractIcebergCatalogTest extends CatalogTests<IcebergCat
public void testRegisterTableRejectsExistingView() {
// Note: there exists a similar test in ViewCatalogTests.registerTableThatAlreadyExistsAsView,
// but it doesn't cover register with overwrite
- IcebergCatalog catalog = catalog();
+ LocalIcebergCatalog catalog = catalog();
Namespace namespace = Namespace.of("register_view_conflict");
TableIdentifier identifier = TableIdentifier.of(namespace, "entity");
if (requiresNamespaceCreate()) {
@@ -2467,7 +2468,7 @@ public abstract class AbstractIcebergCatalogTest extends CatalogTests<IcebergCat
// Use a spy so that non-transactional pre-requisites succeed normally, but we inject
// a concurrency failure at final commit.
PolarisMetaStoreManager spyMetaStore = spy(metaStoreManager);
- final IcebergCatalog catalog = newIcebergCatalog(CATALOG_NAME, spyMetaStore);
+ final LocalIcebergCatalog catalog = newIcebergCatalog(CATALOG_NAME, spyMetaStore);
catalog.initialize(
CATALOG_NAME,
ImmutableMap.of(
@@ -2504,7 +2505,7 @@ public abstract class AbstractIcebergCatalogTest extends CatalogTests<IcebergCat
// Use a spy so that non-transactional pre-requisites succeed normally, but we inject
// a concurrency failure at final commit.
PolarisMetaStoreManager spyMetaStore = spy(metaStoreManager);
- final IcebergCatalog catalog = newIcebergCatalog(CATALOG_NAME, spyMetaStore);
+ final LocalIcebergCatalog catalog = newIcebergCatalog(CATALOG_NAME, spyMetaStore);
catalog.initialize(
CATALOG_NAME,
ImmutableMap.of(
@@ -2580,10 +2581,10 @@ public abstract class AbstractIcebergCatalogTest extends CatalogTests<IcebergCat
catalog.createNamespace(NS);
catalog.buildTable(TABLE, SCHEMA).create();
- IcebergCatalog.BasePolarisTableOperations realOps =
- (IcebergCatalog.BasePolarisTableOperations)
+ LocalIcebergCatalog.BasePolarisTableOperations realOps =
+ (LocalIcebergCatalog.BasePolarisTableOperations)
catalog.newTableOps(TABLE, updateMetadataOnCommit);
- IcebergCatalog.BasePolarisTableOperations ops = Mockito.spy(realOps);
+ LocalIcebergCatalog.BasePolarisTableOperations ops = Mockito.spy(realOps);
try (MockedStatic<TableMetadataParser> mocked =
Mockito.mockStatic(TableMetadataParser.class, Mockito.CALLS_REAL_METHODS)) {
@@ -2821,7 +2822,7 @@ public abstract class AbstractIcebergCatalogTest extends CatalogTests<IcebergCat
@Test
public void testEventsAreEmitted() {
- IcebergCatalog catalog = catalog();
+ LocalIcebergCatalog catalog = catalog();
catalog.createNamespace(TestData.NAMESPACE);
Table table = catalog.buildTable(TestData.TABLE, TestData.SCHEMA).create();
diff --git a/runtime/service/src/test/java/org/apache/polaris/service/catalog/iceberg/AbstractIcebergCatalogViewTest.java b/runtime/service/src/test/java/org/apache/polaris/service/catalog/iceberg/AbstractLocalIcebergCatalogViewTest.java
similarity index 97%
rename from runtime/service/src/test/java/org/apache/polaris/service/catalog/iceberg/AbstractIcebergCatalogViewTest.java
rename to runtime/service/src/test/java/org/apache/polaris/service/catalog/iceberg/AbstractLocalIcebergCatalogViewTest.java
index 1d6299dc46..aef84fc8f9 100644
--- a/runtime/service/src/test/java/org/apache/polaris/service/catalog/iceberg/AbstractIcebergCatalogViewTest.java
+++ b/runtime/service/src/test/java/org/apache/polaris/service/catalog/iceberg/AbstractLocalIcebergCatalogViewTest.java
@@ -79,7 +79,8 @@ import org.junit.jupiter.api.TestInfo;
import org.junit.jupiter.api.io.TempDir;
import org.mockito.Mockito;
-public abstract class AbstractIcebergCatalogViewTest extends ViewCatalogTests<IcebergCatalog> {
+public abstract class AbstractLocalIcebergCatalogViewTest
+ extends ViewCatalogTests<LocalIcebergCatalog> {
static {
Assumptions.setPreferredAssumptionException(PreferredAssumptionException.JUNIT5);
}
@@ -126,7 +127,7 @@ public abstract class AbstractIcebergCatalogViewTest extends ViewCatalogTests<Ic
@Inject StorageAccessConfigProvider storageAccessConfigProvider;
@Inject FileIOFactory fileIOFactory;
- private IcebergCatalog catalog;
+ private LocalIcebergCatalog catalog;
private String realmName;
private PolarisCallContext polarisContext;
@@ -205,7 +206,7 @@ public abstract class AbstractIcebergCatalogViewTest extends ViewCatalogTests<Ic
testPolarisEventListener = (TestPolarisEventListener) polarisEventListener;
testPolarisEventListener.clear();
this.catalog =
- new IcebergCatalog(
+ new LocalIcebergCatalog(
diagServices,
resolverFactory,
metaStoreManager,
@@ -232,7 +233,7 @@ public abstract class AbstractIcebergCatalogViewTest extends ViewCatalogTests<Ic
}
@Override
- protected IcebergCatalog catalog() {
+ protected LocalIcebergCatalog catalog() {
return catalog;
}
@@ -248,7 +249,7 @@ public abstract class AbstractIcebergCatalogViewTest extends ViewCatalogTests<Ic
@Test
public void testEventsAreEmitted() {
- IcebergCatalog catalog = catalog();
+ LocalIcebergCatalog catalog = catalog();
catalog.createNamespace(TestData.NAMESPACE);
View view =
catalog
diff --git a/runtime/service/src/test/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalogHandlerTest.java b/runtime/service/src/test/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalogHandlerTest.java
index 14c1d3d4b9..ebf1feac31 100644
--- a/runtime/service/src/test/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalogHandlerTest.java
+++ b/runtime/service/src/test/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalogHandlerTest.java
@@ -205,7 +205,7 @@ class IcebergCatalogHandlerTest {
.build());
when(resolvedPath.getRawLeafEntity()).thenReturn(leafEntity);
- IcebergCatalog icebergCatalog = mock(IcebergCatalog.class);
+ LocalIcebergCatalog icebergCatalog = mock(LocalIcebergCatalog.class);
when(localCatalogFactory.createCatalog(any())).thenReturn(icebergCatalog);
StorageAccessConfig storageAccessConfig =
@@ -266,7 +266,7 @@ class IcebergCatalogHandlerTest {
BaseTable table = mock(BaseTable.class);
when(table.operations()).thenReturn(ops);
- IcebergCatalog icebergCatalog = mock(IcebergCatalog.class);
+ LocalIcebergCatalog icebergCatalog = mock(LocalIcebergCatalog.class);
when(icebergCatalog.loadTable(TABLE2)).thenReturn(table);
when(localCatalogFactory.createCatalog(any())).thenReturn(icebergCatalog);
diff --git a/runtime/service/src/test/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalogNoSqlInMemTest.java b/runtime/service/src/test/java/org/apache/polaris/service/catalog/iceberg/LocalIcebergCatalogNoSqlInMemTest.java
similarity index 87%
rename from runtime/service/src/test/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalogNoSqlInMemTest.java
rename to runtime/service/src/test/java/org/apache/polaris/service/catalog/iceberg/LocalIcebergCatalogNoSqlInMemTest.java
index 7ea2a3c33d..1c0c0278bb 100644
--- a/runtime/service/src/test/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalogNoSqlInMemTest.java
+++ b/runtime/service/src/test/java/org/apache/polaris/service/catalog/iceberg/LocalIcebergCatalogNoSqlInMemTest.java
@@ -28,10 +28,10 @@ import java.util.Map;
import org.apache.polaris.core.persistence.bootstrap.RootCredentialsSet;
@QuarkusTest
-@TestProfile(IcebergCatalogNoSqlInMemTest.Profile.class)
-public class IcebergCatalogNoSqlInMemTest extends AbstractIcebergCatalogTest {
+@TestProfile(LocalIcebergCatalogNoSqlInMemTest.Profile.class)
+public class LocalIcebergCatalogNoSqlInMemTest extends AbstractLocalIcebergCatalogTest {
- public static class Profile extends AbstractIcebergCatalogTest.Profile {
+ public static class Profile extends AbstractLocalIcebergCatalogTest.Profile {
@Override
public Map<String, String> getConfigOverrides() {
return ImmutableMap.<String, String>builder()
diff --git a/runtime/service/src/test/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalogRelationalTest.java b/runtime/service/src/test/java/org/apache/polaris/service/catalog/iceberg/LocalIcebergCatalogRelationalTest.java
similarity index 86%
rename from runtime/service/src/test/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalogRelationalTest.java
rename to runtime/service/src/test/java/org/apache/polaris/service/catalog/iceberg/LocalIcebergCatalogRelationalTest.java
index 049e240f08..26c2d86ce7 100644
--- a/runtime/service/src/test/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalogRelationalTest.java
+++ b/runtime/service/src/test/java/org/apache/polaris/service/catalog/iceberg/LocalIcebergCatalogRelationalTest.java
@@ -22,5 +22,5 @@ import io.quarkus.test.junit.QuarkusTest;
import io.quarkus.test.junit.TestProfile;
@QuarkusTest
-@TestProfile(AbstractIcebergCatalogTest.Profile.class)
-public class IcebergCatalogRelationalTest extends AbstractIcebergCatalogTest {}
+@TestProfile(AbstractLocalIcebergCatalogTest.Profile.class)
+public class LocalIcebergCatalogRelationalTest extends AbstractLocalIcebergCatalogTest {}
diff --git a/runtime/service/src/test/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalogTest.java b/runtime/service/src/test/java/org/apache/polaris/service/catalog/iceberg/LocalIcebergCatalogTest.java
similarity index 98%
rename from runtime/service/src/test/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalogTest.java
rename to runtime/service/src/test/java/org/apache/polaris/service/catalog/iceberg/LocalIcebergCatalogTest.java
index b57bc2b9e2..a1890e14d1 100644
--- a/runtime/service/src/test/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalogTest.java
+++ b/runtime/service/src/test/java/org/apache/polaris/service/catalog/iceberg/LocalIcebergCatalogTest.java
@@ -51,7 +51,7 @@ import org.mockito.Mock;
import org.mockito.junit.jupiter.MockitoExtension;
@ExtendWith(MockitoExtension.class)
-class IcebergCatalogTest {
+class LocalIcebergCatalogTest {
@Mock ResolverFactory resolverFactory;
@Mock CallContext callContext;
@@ -66,7 +66,7 @@ class IcebergCatalogTest {
private final PolarisPrincipal principal = PolarisPrincipal.of("test", Map.of(), Set.of());
- private IcebergCatalog catalog;
+ private LocalIcebergCatalog catalog;
private ResolvedPolarisEntity rns1 = new ResolvedPolarisEntity(ns1, List.of(), List.of());
private ResolvedPolarisEntity rns2 = new ResolvedPolarisEntity(ns2, List.of(), List.of());
private ResolvedPolarisEntity rt3 = new ResolvedPolarisEntity(table3, List.of(), List.of());
@@ -82,7 +82,7 @@ class IcebergCatalogTest {
rt3 = new ResolvedPolarisEntity(table3, List.of(), List.of());
catalog =
- new IcebergCatalog(
+ new LocalIcebergCatalog(
diagnostics,
resolverFactory,
null,
diff --git a/runtime/service/src/test/java/org/apache/polaris/service/catalog/iceberg/IcebergViewCatalogNoSqlInMemTest.java b/runtime/service/src/test/java/org/apache/polaris/service/catalog/iceberg/LocalIcebergViewCatalogNoSqlInMemTest.java
similarity index 88%
rename from runtime/service/src/test/java/org/apache/polaris/service/catalog/iceberg/IcebergViewCatalogNoSqlInMemTest.java
rename to runtime/service/src/test/java/org/apache/polaris/service/catalog/iceberg/LocalIcebergViewCatalogNoSqlInMemTest.java
index 4089c173f7..623f68db1d 100644
--- a/runtime/service/src/test/java/org/apache/polaris/service/catalog/iceberg/IcebergViewCatalogNoSqlInMemTest.java
+++ b/runtime/service/src/test/java/org/apache/polaris/service/catalog/iceberg/LocalIcebergViewCatalogNoSqlInMemTest.java
@@ -30,12 +30,12 @@ import org.apache.polaris.core.persistence.MetaStoreManagerFactory;
import org.apache.polaris.core.persistence.bootstrap.RootCredentialsSet;
@QuarkusTest
-@TestProfile(IcebergViewCatalogNoSqlInMemTest.Profile.class)
-public class IcebergViewCatalogNoSqlInMemTest extends AbstractIcebergCatalogViewTest {
+@TestProfile(LocalIcebergViewCatalogNoSqlInMemTest.Profile.class)
+public class LocalIcebergViewCatalogNoSqlInMemTest extends AbstractLocalIcebergCatalogViewTest {
@Inject MetaStoreManagerFactory metaStoreManagerFactory;
- public static class Profile extends AbstractIcebergCatalogViewTest.Profile {
+ public static class Profile extends AbstractLocalIcebergCatalogViewTest.Profile {
@Override
public Map<String, String> getConfigOverrides() {
return ImmutableMap.<String, String>builder()
diff --git a/runtime/service/src/test/java/org/apache/polaris/service/catalog/iceberg/IcebergViewCatalogRelationalTest.java b/runtime/service/src/test/java/org/apache/polaris/service/catalog/iceberg/LocalIcebergViewCatalogRelationalTest.java
similarity index 85%
rename from runtime/service/src/test/java/org/apache/polaris/service/catalog/iceberg/IcebergViewCatalogRelationalTest.java
rename to runtime/service/src/test/java/org/apache/polaris/service/catalog/iceberg/LocalIcebergViewCatalogRelationalTest.java
index 3bbbf5f8a3..f8c34b103f 100644
--- a/runtime/service/src/test/java/org/apache/polaris/service/catalog/iceberg/IcebergViewCatalogRelationalTest.java
+++ b/runtime/service/src/test/java/org/apache/polaris/service/catalog/iceberg/LocalIcebergViewCatalogRelationalTest.java
@@ -22,5 +22,5 @@ import io.quarkus.test.junit.QuarkusTest;
import io.quarkus.test.junit.TestProfile;
@QuarkusTest
-@TestProfile(AbstractIcebergCatalogViewTest.Profile.class)
-public class IcebergViewCatalogRelationalTest extends AbstractIcebergCatalogViewTest {}
+@TestProfile(AbstractLocalIcebergCatalogViewTest.Profile.class)
+public class LocalIcebergViewCatalogRelationalTest extends AbstractLocalIcebergCatalogViewTest {}
diff --git a/runtime/service/src/test/java/org/apache/polaris/service/catalog/io/FileIOFactoryTest.java b/runtime/service/src/test/java/org/apache/polaris/service/catalog/io/FileIOFactoryTest.java
index 8b7cbce947..a1f122774c 100644
--- a/runtime/service/src/test/java/org/apache/polaris/service/catalog/io/FileIOFactoryTest.java
+++ b/runtime/service/src/test/java/org/apache/polaris/service/catalog/io/FileIOFactoryTest.java
@@ -47,7 +47,7 @@ import org.apache.polaris.core.entity.TaskEntity;
import org.apache.polaris.core.persistence.pagination.PageToken;
import org.apache.polaris.service.TestServices;
import org.apache.polaris.service.catalog.PolarisPassthroughResolutionView;
-import org.apache.polaris.service.catalog.iceberg.IcebergCatalog;
+import org.apache.polaris.service.catalog.iceberg.LocalIcebergCatalog;
import org.apache.polaris.service.task.TaskFileIOSupplier;
import org.assertj.core.api.Assertions;
import org.jspecify.annotations.NonNull;
@@ -144,7 +144,7 @@ public class FileIOFactoryTest {
@ParameterizedTest
@ValueSource(strings = {"s3a", "s3"})
public void testLoadFileIOForTableLike(String scheme) {
- IcebergCatalog catalog = createCatalog(testServices, scheme);
+ LocalIcebergCatalog catalog = createCatalog(testServices, scheme);
catalog.createNamespace(NS);
catalog.createTable(TABLE, SCHEMA);
@@ -156,7 +156,7 @@ public class FileIOFactoryTest {
@ParameterizedTest
@ValueSource(strings = {"s3a", "s3"})
public void testLoadFileIOForCleanupTask(String scheme) {
- IcebergCatalog catalog = createCatalog(testServices, scheme);
+ LocalIcebergCatalog catalog = createCatalog(testServices, scheme);
catalog.createNamespace(NS);
catalog.createTable(TABLE, SCHEMA);
catalog.dropTable(TABLE, true);
@@ -183,7 +183,7 @@ public class FileIOFactoryTest {
.loadFileIO(Mockito.any(), Mockito.any(), Mockito.any());
}
- IcebergCatalog createCatalog(TestServices services, String scheme) {
+ LocalIcebergCatalog createCatalog(TestServices services, String scheme) {
String storageLocation = scheme + "://my-bucket/path/to/data";
AwsStorageConfigInfo awsStorageConfigInfo =
AwsStorageConfigInfo.builder()
@@ -208,8 +208,8 @@ public class FileIOFactoryTest {
PolarisPassthroughResolutionView passthroughView =
new PolarisPassthroughResolutionView(
services.resolutionManifestFactory(), services.principal(), CATALOG_NAME);
- IcebergCatalog polarisCatalog =
- new IcebergCatalog(
+ LocalIcebergCatalog polarisCatalog =
+ new LocalIcebergCatalog(
services.polarisDiagnostics(),
services.resolverFactory(),
services.metaStoreManager(),
diff --git a/runtime/service/src/test/java/org/apache/polaris/service/catalog/policy/AbstractPolicyCatalogTest.java b/runtime/service/src/test/java/org/apache/polaris/service/catalog/policy/AbstractPolicyCatalogTest.java
index 973172ccaa..cb302eb9c8 100644
--- a/runtime/service/src/test/java/org/apache/polaris/service/catalog/policy/AbstractPolicyCatalogTest.java
+++ b/runtime/service/src/test/java/org/apache/polaris/service/catalog/policy/AbstractPolicyCatalogTest.java
@@ -74,7 +74,7 @@ import org.apache.polaris.core.storage.aws.AwsStorageConfigurationInfo;
import org.apache.polaris.core.storage.cache.StorageCredentialCache;
import org.apache.polaris.service.admin.PolarisAdminService;
import org.apache.polaris.service.catalog.PolarisPassthroughResolutionView;
-import org.apache.polaris.service.catalog.iceberg.IcebergCatalog;
+import org.apache.polaris.service.catalog.iceberg.LocalIcebergCatalog;
import org.apache.polaris.service.catalog.io.FileIOFactory;
import org.apache.polaris.service.catalog.io.StorageAccessConfigProvider;
import org.apache.polaris.service.config.ReservedProperties;
@@ -137,7 +137,7 @@ public abstract class AbstractPolicyCatalogTest {
@Inject PolarisPrincipalHolder polarisPrincipalHolder;
private PolicyCatalog policyCatalog;
- private IcebergCatalog icebergCatalog;
+ private LocalIcebergCatalog icebergCatalog;
private AwsStorageConfigInfo storageConfigModel;
private String realmName;
private PolarisCallContext polarisContext;
@@ -244,7 +244,7 @@ public abstract class AbstractPolicyCatalogTest {
this.policyCatalog = new PolicyCatalog(metaStoreManager, polarisContext, passthroughView);
this.icebergCatalog =
- new IcebergCatalog(
+ new LocalIcebergCatalog(
diagServices,
resolverFactory,
metaStoreManager,
diff --git a/runtime/service/src/test/java/org/apache/polaris/service/distcache/TestPersistenceDistCacheInvalidationsIntegration.java b/runtime/service/src/test/java/org/apache/polaris/service/distcache/TestPersistenceDistCacheInvalidationsIntegration.java
index 41f9628578..4ba068027e 100644
--- a/runtime/service/src/test/java/org/apache/polaris/service/distcache/TestPersistenceDistCacheInvalidationsIntegration.java
+++ b/runtime/service/src/test/java/org/apache/polaris/service/distcache/TestPersistenceDistCacheInvalidationsIntegration.java
@@ -49,7 +49,7 @@ import org.apache.polaris.persistence.nosql.api.cache.CacheBackend;
import org.apache.polaris.persistence.nosql.api.cache.CacheInvalidations;
import org.apache.polaris.persistence.nosql.api.cache.CacheInvalidations.CacheInvalidation;
import org.apache.polaris.persistence.nosql.api.obj.SimpleTestObj;
-import org.apache.polaris.service.catalog.iceberg.AbstractIcebergCatalogTest;
+import org.apache.polaris.service.catalog.iceberg.AbstractLocalIcebergCatalogTest;
import org.assertj.core.api.SoftAssertions;
import org.eclipse.microprofile.config.ConfigProvider;
import org.junit.jupiter.api.AfterEach;
@@ -69,7 +69,7 @@ import org.junit.jupiter.api.condition.OS;
@SuppressWarnings("CdiInjectionPointsInspection")
public class TestPersistenceDistCacheInvalidationsIntegration {
- public static class Profile extends AbstractIcebergCatalogTest.Profile {
+ public static class Profile extends AbstractLocalIcebergCatalogTest.Profile {
@Override
public Map<String, String> getConfigOverrides() {
return ImmutableMap.<String, String>builder()