Class FileIOUtil

java.lang.Object
org.apache.polaris.service.catalog.io.FileIOUtil

public class FileIOUtil extends Object
  • Method Summary

    Modifier and Type
    Method
    Description
    static Optional<org.apache.polaris.core.entity.PolarisEntity>
    findStorageInfoFromHierarchy(org.apache.polaris.core.persistence.PolarisResolvedPathWrapper resolvedStorageEntity)
    Finds storage configuration information in the hierarchy of the resolved storage entity.
    static org.apache.polaris.core.storage.AccessConfig
    refreshAccessConfig(org.apache.polaris.core.context.CallContext callContext, org.apache.polaris.core.persistence.PolarisEntityManager entityManager, org.apache.polaris.core.storage.PolarisCredentialVendor credentialVendor, org.apache.polaris.core.config.PolarisConfigurationStore configurationStore, org.apache.iceberg.catalog.TableIdentifier tableIdentifier, Set<String> tableLocations, Set<org.apache.polaris.core.storage.PolarisStorageActions> storageActions, org.apache.polaris.core.entity.PolarisEntity entity)
    Refreshes or generates subscoped creds for accessing table storage based on the params.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • findStorageInfoFromHierarchy

      public static Optional<org.apache.polaris.core.entity.PolarisEntity> findStorageInfoFromHierarchy(org.apache.polaris.core.persistence.PolarisResolvedPathWrapper resolvedStorageEntity)
      Finds storage configuration information in the hierarchy of the resolved storage entity.

      This method starts at the "leaf" level (e.g., table) and walks "upwards" through namespaces in the hierarchy to the "root." It searches for the first entity containing storage config properties, identified using a key from PolarisEntityConstants.getStorageConfigInfoPropertyName().

      Parameters:
      resolvedStorageEntity - the resolved entity wrapper containing the hierarchical path
      Returns:
      an Optional containing the entity with storage config, or empty if not found
    • refreshAccessConfig

      public static org.apache.polaris.core.storage.AccessConfig refreshAccessConfig(org.apache.polaris.core.context.CallContext callContext, org.apache.polaris.core.persistence.PolarisEntityManager entityManager, org.apache.polaris.core.storage.PolarisCredentialVendor credentialVendor, org.apache.polaris.core.config.PolarisConfigurationStore configurationStore, org.apache.iceberg.catalog.TableIdentifier tableIdentifier, Set<String> tableLocations, Set<org.apache.polaris.core.storage.PolarisStorageActions> storageActions, org.apache.polaris.core.entity.PolarisEntity entity)
      Refreshes or generates subscoped creds for accessing table storage based on the params.

      Use cases:

      • In IcebergCatalog, subscoped credentials are generated or refreshed when the client sends a loadTable request to vend credentials.
      • In DefaultFileIOFactory, subscoped credentials are obtained to access the storage and read/write metadata JSON files.