eric-maynard commented on code in PR #407:
URL: https://github.com/apache/polaris/pull/407#discussion_r1819813468


##########
polaris-service/src/main/java/org/apache/polaris/service/config/DefaultConfigurationStore.java:
##########
@@ -21,18 +21,30 @@
 import java.util.Map;
 import org.apache.polaris.core.PolarisCallContext;
 import org.apache.polaris.core.PolarisConfigurationStore;
+import org.apache.polaris.core.context.CallContext;
+import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
 public class DefaultConfigurationStore implements PolarisConfigurationStore {
-  private final Map<String, Object> properties;
+  private final Map<String, Object> config;
+  private final Map<String, Map<String, Object>> realmConfig;

Review Comment:
   nit: Maybe a name like globalConfig or fallbackConfig would be more clear



##########
polaris-service/src/main/java/org/apache/polaris/service/config/PolarisApplicationConfig.java:
##########
@@ -170,7 +169,12 @@ public TaskHandlerConfiguration getTaskHandler() {
 
   @JsonProperty("featureConfiguration")
   public void setFeatureConfiguration(Map<String, Object> 
featureConfiguration) {
-    this.configurationStore = new 
DefaultConfigurationStore(featureConfiguration);
+    this.featureConfiguration = featureConfiguration;
+  }
+
+  @JsonProperty("realmFeatureConfiguration")

Review Comment:
   What does the config file look like in this case? It seems to be something 
like...
   
   ```
   featureConfiguration:
     SOME_FEATURE: true
   
   realmFeatureConfiguration:
     realm_1:
       SOME_FEATURE: true
     realm_2:
       SOME_FEATURE: false
   ```
   
   Can we do any validation that these realms actually exist?



##########
polaris-service/src/test/java/org/apache/polaris/service/config/DefaultConfigurationStoreTest.java:
##########
@@ -0,0 +1,109 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.polaris.service.config;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+import java.util.Map;
+import org.apache.polaris.core.PolarisCallContext;
+import org.apache.polaris.core.PolarisDefaultDiagServiceImpl;
+import 
org.apache.polaris.service.persistence.InMemoryPolarisMetaStoreManagerFactory;
+import org.junit.jupiter.api.Test;
+
+class DefaultConfigurationStoreTest {

Review Comment:
   Other tests are `public`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to