Class CatalogUtils
java.lang.Object
org.apache.polaris.service.catalog.common.CatalogUtils
Utility methods for working with Polaris catalog entities.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.polaris.core.persistence.PolarisResolvedPathWrapperfindResolvedStorageEntity(org.apache.polaris.core.persistence.resolver.PolarisResolutionManifestCatalogView resolvedEntityView, org.apache.iceberg.catalog.TableIdentifier tableIdentifier) Find the resolved entity path that may contain storage informationstatic voidvalidateLocationsForTableLike(org.apache.polaris.core.config.RealmConfig realmConfig, org.apache.iceberg.catalog.TableIdentifier identifier, Set<String> locations, org.apache.polaris.core.persistence.PolarisResolvedPathWrapper resolvedStorageEntity) Validates that the specifiedlocationsare valid for whatever storage config is found for the given entity's parent hierarchy.
-
Constructor Details
-
CatalogUtils
public CatalogUtils()
-
-
Method Details
-
findResolvedStorageEntity
public static org.apache.polaris.core.persistence.PolarisResolvedPathWrapper findResolvedStorageEntity(org.apache.polaris.core.persistence.resolver.PolarisResolutionManifestCatalogView resolvedEntityView, org.apache.iceberg.catalog.TableIdentifier tableIdentifier) Find the resolved entity path that may contain storage information- Parameters:
resolvedEntityView- The resolved entity view containing catalog entities.tableIdentifier- The table identifier for which to find storage information.- Returns:
- The resolved path wrapper that may contain storage information.
-
validateLocationsForTableLike
public static void validateLocationsForTableLike(org.apache.polaris.core.config.RealmConfig realmConfig, org.apache.iceberg.catalog.TableIdentifier identifier, Set<String> locations, org.apache.polaris.core.persistence.PolarisResolvedPathWrapper resolvedStorageEntity) Validates that the specifiedlocationsare valid for whatever storage config is found for the given entity's parent hierarchy.- Parameters:
realmConfig- the realm configurationidentifier- the table identifier (for error messages)locations- the set of locations to validate (base location + write.data.path + write.metadata.path)resolvedStorageEntity- the resolved path wrapper containing storage configuration- Throws:
org.apache.iceberg.exceptions.ForbiddenException- if any location is outside the allowed locations or if file locations are not allowed
-