Class FileIOUtil
java.lang.Object
org.apache.polaris.service.catalog.io.FileIOUtil
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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.AccessConfigrefreshAccessConfig(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.
-
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
Optionalcontaining 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.
- In
-