Class CatalogUtils

java.lang.Object
org.apache.polaris.service.catalog.common.CatalogUtils

public class CatalogUtils extends Object
Utility methods for working with Polaris catalog entities.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    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
    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 specified locations are valid for whatever storage config is found for the given entity's parent hierarchy.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 specified locations are valid for whatever storage config is found for the given entity's parent hierarchy.
      Parameters:
      realmConfig - the realm configuration
      identifier - 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