You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@polaris.apache.org by yz...@apache.org on 2026/04/06 17:25:21 UTC
(polaris) 02/06: Use imported StorageAccessConfig instead of fully qualified path
This is an automated email from the ASF dual-hosted git repository.
yzou pushed a commit to branch yzou-generic-table-credential-vending
in repository https://gitbox.apache.org/repos/asf/polaris.git
commit eb474f2ce1bb4f91be3f8c28da66ef325cdb2747
Author: Yun Zou <yu...@gmail.com>
AuthorDate: Thu Apr 2 17:30:17 2026 -0700
Use imported StorageAccessConfig instead of fully qualified path
Made-with: Cursor
---
.../catalog/generic/GenericTableCatalogHandler.java | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)
diff --git a/runtime/service/src/main/java/org/apache/polaris/service/catalog/generic/GenericTableCatalogHandler.java b/runtime/service/src/main/java/org/apache/polaris/service/catalog/generic/GenericTableCatalogHandler.java
index 917c82c5ee..568a3fb7c1 100644
--- a/runtime/service/src/main/java/org/apache/polaris/service/catalog/generic/GenericTableCatalogHandler.java
+++ b/runtime/service/src/main/java/org/apache/polaris/service/catalog/generic/GenericTableCatalogHandler.java
@@ -39,7 +39,6 @@ import org.apache.polaris.core.entity.PolarisEntitySubType;
import org.apache.polaris.core.entity.table.GenericTableEntity;
import org.apache.polaris.core.persistence.PolarisResolvedPathWrapper;
import org.apache.polaris.core.storage.PolarisStorageActions;
-import org.apache.polaris.core.storage.StorageAccessConfig;
import org.apache.polaris.immutables.PolarisImmutable;
import org.apache.polaris.service.catalog.common.CatalogHandler;
import org.apache.polaris.service.catalog.common.CatalogUtils;
@@ -47,6 +46,7 @@ import org.apache.polaris.service.catalog.io.StorageAccessConfigProvider;
import org.apache.polaris.service.types.GenericTable;
import org.apache.polaris.service.types.ListGenericTablesResponse;
import org.apache.polaris.service.types.LoadGenericTableResponse;
+import org.apache.polaris.service.types.StorageAccessConfig;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -136,7 +136,7 @@ public abstract class GenericTableCatalogHandler extends CatalogHandler {
.setProperties(createdEntity.getPropertiesAsMap())
.build();
- List<org.apache.polaris.service.types.StorageAccessConfig> storageAccessConfigs =
+ List<StorageAccessConfig> storageAccessConfigs =
isCredentialVendingEnabled()
? vendCredentials(
identifier,
@@ -178,7 +178,7 @@ public abstract class GenericTableCatalogHandler extends CatalogHandler {
.setProperties(loadedEntity.getPropertiesAsMap())
.build();
- List<org.apache.polaris.service.types.StorageAccessConfig> storageAccessConfigs =
+ List<StorageAccessConfig> storageAccessConfigs =
credentialVendingEnabled
? vendCredentials(identifier, loadedEntity, actionsRequested)
: List.of();
@@ -196,7 +196,7 @@ public abstract class GenericTableCatalogHandler extends CatalogHandler {
resolutionManifest.getResolvedCatalogEntity());
}
- private List<org.apache.polaris.service.types.StorageAccessConfig> vendCredentials(
+ private List<StorageAccessConfig> vendCredentials(
TableIdentifier tableIdentifier,
GenericTableEntity entity,
Set<PolarisStorageActions> actions) {
@@ -218,7 +218,7 @@ public abstract class GenericTableCatalogHandler extends CatalogHandler {
}
Set<String> tableLocations = Set.of(baseLocation);
- StorageAccessConfig storageAccessConfig =
+ org.apache.polaris.core.storage.StorageAccessConfig storageAccessConfig =
storageAccessConfigProvider()
.getStorageAccessConfig(
tableIdentifier, tableLocations, actions, Optional.empty(), resolvedStoragePath);
@@ -233,9 +233,6 @@ public abstract class GenericTableCatalogHandler extends CatalogHandler {
allConfig.putAll(storageAccessConfig.extraProperties());
return List.of(
- org.apache.polaris.service.types.StorageAccessConfig.builder()
- .setPrefix(baseLocation)
- .setConfig(allConfig)
- .build());
+ StorageAccessConfig.builder().setPrefix(baseLocation).setConfig(allConfig).build());
}
}