File tree Expand file tree Collapse file tree 5 files changed +6
-7
lines changed
polaris-core/src/main/java/org/apache/polaris/core/config
runtime/service/src/main/java/org/apache/polaris/service Expand file tree Collapse file tree 5 files changed +6
-7
lines changed Original file line number Diff line number Diff line change 2323import org .apache .polaris .core .admin .model .AuthenticationParameters ;
2424import org .apache .polaris .core .admin .model .StorageConfigInfo ;
2525import org .apache .polaris .core .connection .ConnectionType ;
26- import org .apache .polaris .core .context .CallContext ;
2726import org .apache .polaris .core .persistence .cache .EntityWeigher ;
2827
2928/**
@@ -48,8 +47,8 @@ protected FeatureConfiguration(
4847 * we want to throw an UnsupportedOperationException if it's not enabled.
4948 */
5049 public static void enforceFeatureEnabledOrThrow (
51- CallContext callContext , FeatureConfiguration <Boolean > featureConfig ) {
52- boolean enabled = callContext . getRealmConfig () .getConfig (featureConfig );
50+ RealmConfig realmConfig , FeatureConfiguration <Boolean > featureConfig ) {
51+ boolean enabled = realmConfig .getConfig (featureConfig );
5352 if (!enabled ) {
5453 throw new UnsupportedOperationException ("Feature not enabled: " + featureConfig .key ());
5554 }
Original file line number Diff line number Diff line change @@ -783,7 +783,7 @@ public PolarisEntity createCatalog(CreateCatalogRequest catalogRequest) {
783783 .addKeyValue ("catalogName" , entity .getName ())
784784 .log ("Creating a federated catalog" );
785785 FeatureConfiguration .enforceFeatureEnabledOrThrow (
786- callContext , FeatureConfiguration .ENABLE_CATALOG_FEDERATION );
786+ callContext . getRealmConfig () , FeatureConfiguration .ENABLE_CATALOG_FEDERATION );
787787 Map <String , UserSecretReference > processedSecretReferences = Map .of ();
788788 List <String > supportedAuthenticationTypes =
789789 callContext
Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ public GenericTableCatalogAdapter(
7474 private GenericTableCatalogHandler newHandlerWrapper (
7575 SecurityContext securityContext , String prefix ) {
7676 FeatureConfiguration .enforceFeatureEnabledOrThrow (
77- callContext , FeatureConfiguration .ENABLE_GENERIC_TABLES );
77+ callContext . getRealmConfig () , FeatureConfiguration .ENABLE_GENERIC_TABLES );
7878 validatePrincipal (securityContext );
7979
8080 return new GenericTableCatalogHandler (
Original file line number Diff line number Diff line change @@ -212,7 +212,7 @@ protected void initializeCatalog() {
212212 .addKeyValue ("remoteUrl" , connectionConfigInfoDpo .getUri ())
213213 .log ("Initializing federated catalog" );
214214 FeatureConfiguration .enforceFeatureEnabledOrThrow (
215- callContext , FeatureConfiguration .ENABLE_CATALOG_FEDERATION );
215+ callContext . getRealmConfig () , FeatureConfiguration .ENABLE_CATALOG_FEDERATION );
216216
217217 Catalog federatedCatalog ;
218218 ConnectionType connectionType =
Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ public PolicyCatalogAdapter(
7474
7575 private PolicyCatalogHandler newHandlerWrapper (SecurityContext securityContext , String prefix ) {
7676 FeatureConfiguration .enforceFeatureEnabledOrThrow (
77- callContext , FeatureConfiguration .ENABLE_POLICY_STORE );
77+ callContext . getRealmConfig () , FeatureConfiguration .ENABLE_POLICY_STORE );
7878 validatePrincipal (securityContext );
7979
8080 return new PolicyCatalogHandler (
You can’t perform that action at this time.
0 commit comments