Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,7 @@ PolarisStorageIntegration<T> createStorageIntegrationInCurrentTxn(
PolarisStorageIntegration<T> loadPolarisStorageIntegrationInCurrentTxn(
@Nonnull PolarisCallContext callCtx, @Nonnull PolarisBaseEntity entity) {
PolarisStorageConfigurationInfo storageConfig =
BaseMetaStoreManager.extractStorageConfiguration(callCtx, entity);
BaseMetaStoreManager.extractStorageConfiguration(callCtx.getDiagServices(), entity);
return storageIntegrationProvider.getStorageIntegrationForConfig(storageConfig);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1120,7 +1120,7 @@ public <T extends PolarisStorageConfigurationInfo> void persistStorageIntegratio
PolarisStorageIntegration<T> loadPolarisStorageIntegration(
@Nonnull PolarisCallContext callContext, @Nonnull PolarisBaseEntity entity) {
PolarisStorageConfigurationInfo storageConfig =
BaseMetaStoreManager.extractStorageConfiguration(callContext, entity);
BaseMetaStoreManager.extractStorageConfiguration(callContext.getDiagServices(), entity);
return storageIntegrationProvider.getStorageIntegrationForConfig(storageConfig);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1608,7 +1608,8 @@ private void revokeGrantRecord(
entityId);

PolarisStorageConfigurationInfo storageConfigurationInfo =
BaseMetaStoreManager.extractStorageConfiguration(callCtx, reloadedEntity.getEntity());
BaseMetaStoreManager.extractStorageConfiguration(
callCtx.getDiagServices(), reloadedEntity.getEntity());
try {
AccessConfig accessConfig =
storageIntegration.getSubscopedCreds(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import jakarta.annotation.Nonnull;
import java.util.Map;
import org.apache.polaris.core.PolarisCallContext;
import org.apache.polaris.core.PolarisDiagnostics;
import org.apache.polaris.core.entity.PolarisBaseEntity;
import org.apache.polaris.core.entity.PolarisEntityConstants;
import org.apache.polaris.core.entity.PolarisEntitySubType;
Expand All @@ -37,20 +38,18 @@ public abstract class BaseMetaStoreManager implements PolarisMetaStoreManager {
private static final ObjectMapper MAPPER = new ObjectMapper();

public static PolarisStorageConfigurationInfo extractStorageConfiguration(
@Nonnull PolarisCallContext callCtx, PolarisBaseEntity reloadedEntity) {
@Nonnull PolarisDiagnostics diagnostics, PolarisBaseEntity reloadedEntity) {
Map<String, String> propMap =
PolarisObjectMapperUtil.deserializeProperties(reloadedEntity.getInternalProperties());
String storageConfigInfoStr =
propMap.get(PolarisEntityConstants.getStorageConfigInfoPropertyName());

callCtx
.getDiagServices()
.check(
storageConfigInfoStr != null,
"missing_storage_configuration_info",
"catalogId={}, entityId={}",
reloadedEntity.getCatalogId(),
reloadedEntity.getId());
diagnostics.check(
storageConfigInfoStr != null,
"missing_storage_configuration_info",
"catalogId={}, entityId={}",
reloadedEntity.getCatalogId(),
reloadedEntity.getId());
return PolarisStorageConfigurationInfo.deserialize(storageConfigInfoStr);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2055,7 +2055,8 @@ private PolarisEntityResolver resolveSecurableToRoleGrant(
entityId);

PolarisStorageConfigurationInfo storageConfigurationInfo =
BaseMetaStoreManager.extractStorageConfiguration(callCtx, reloadedEntity.getEntity());
BaseMetaStoreManager.extractStorageConfiguration(
callCtx.getDiagServices(), reloadedEntity.getEntity());
try {
AccessConfig accessConfig =
storageIntegration.getSubscopedCreds(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ PolarisStorageIntegration<T> createStorageIntegrationInCurrentTxn(
PolarisStorageIntegration<T> loadPolarisStorageIntegrationInCurrentTxn(
@Nonnull PolarisCallContext callCtx, @Nonnull PolarisBaseEntity entity) {
PolarisStorageConfigurationInfo storageConfig =
BaseMetaStoreManager.extractStorageConfiguration(callCtx, entity);
BaseMetaStoreManager.extractStorageConfiguration(callCtx.getDiagServices(), entity);
return storageIntegrationProvider.getStorageIntegrationForConfig(storageConfig);
}

Expand Down