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 23
23
import org .apache .polaris .core .admin .model .AuthenticationParameters ;
24
24
import org .apache .polaris .core .admin .model .StorageConfigInfo ;
25
25
import org .apache .polaris .core .connection .ConnectionType ;
26
- import org .apache .polaris .core .context .CallContext ;
27
26
import org .apache .polaris .core .persistence .cache .EntityWeigher ;
28
27
29
28
/**
@@ -48,8 +47,8 @@ protected FeatureConfiguration(
48
47
* we want to throw an UnsupportedOperationException if it's not enabled.
49
48
*/
50
49
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 );
53
52
if (!enabled ) {
54
53
throw new UnsupportedOperationException ("Feature not enabled: " + featureConfig .key ());
55
54
}
Original file line number Diff line number Diff line change @@ -783,7 +783,7 @@ public PolarisEntity createCatalog(CreateCatalogRequest catalogRequest) {
783
783
.addKeyValue ("catalogName" , entity .getName ())
784
784
.log ("Creating a federated catalog" );
785
785
FeatureConfiguration .enforceFeatureEnabledOrThrow (
786
- callContext , FeatureConfiguration .ENABLE_CATALOG_FEDERATION );
786
+ callContext . getRealmConfig () , FeatureConfiguration .ENABLE_CATALOG_FEDERATION );
787
787
Map <String , UserSecretReference > processedSecretReferences = Map .of ();
788
788
List <String > supportedAuthenticationTypes =
789
789
callContext
Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ public GenericTableCatalogAdapter(
74
74
private GenericTableCatalogHandler newHandlerWrapper (
75
75
SecurityContext securityContext , String prefix ) {
76
76
FeatureConfiguration .enforceFeatureEnabledOrThrow (
77
- callContext , FeatureConfiguration .ENABLE_GENERIC_TABLES );
77
+ callContext . getRealmConfig () , FeatureConfiguration .ENABLE_GENERIC_TABLES );
78
78
validatePrincipal (securityContext );
79
79
80
80
return new GenericTableCatalogHandler (
Original file line number Diff line number Diff line change @@ -212,7 +212,7 @@ protected void initializeCatalog() {
212
212
.addKeyValue ("remoteUrl" , connectionConfigInfoDpo .getUri ())
213
213
.log ("Initializing federated catalog" );
214
214
FeatureConfiguration .enforceFeatureEnabledOrThrow (
215
- callContext , FeatureConfiguration .ENABLE_CATALOG_FEDERATION );
215
+ callContext . getRealmConfig () , FeatureConfiguration .ENABLE_CATALOG_FEDERATION );
216
216
217
217
Catalog federatedCatalog ;
218
218
ConnectionType connectionType =
Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ public PolicyCatalogAdapter(
74
74
75
75
private PolicyCatalogHandler newHandlerWrapper (SecurityContext securityContext , String prefix ) {
76
76
FeatureConfiguration .enforceFeatureEnabledOrThrow (
77
- callContext , FeatureConfiguration .ENABLE_POLICY_STORE );
77
+ callContext . getRealmConfig () , FeatureConfiguration .ENABLE_POLICY_STORE );
78
78
validatePrincipal (securityContext );
79
79
80
80
return new PolicyCatalogHandler (
You can’t perform that action at this time.
0 commit comments