You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2021/05/12 04:50:37 UTC

[GitHub] [incubator-pinot] amarathavale commented on a change in pull request #6842: Core Pinot Environment Provider Implementation Logic to fetch Failureā€¦

amarathavale commented on a change in pull request #6842:
URL: https://github.com/apache/incubator-pinot/pull/6842#discussion_r630721982



##########
File path: pinot-server/src/main/java/org/apache/pinot/server/starter/helix/HelixServerStarter.java
##########
@@ -154,6 +161,36 @@ public HelixServerStarter(String helixClusterName, String zkAddress, PinotConfig
             Server.DEFAULT_CURRENT_DATA_TABLE_VERSION));
   }
 
+  /**
+   *  Invoke pinot environment provider factory's init method to register the environment provider &
+   *  fetch the overridden server configs for the invoked environment provider.
+   */
+  @Nullable
+  private Map<String, String> fetchEnvironmentProperties() {
+    PinotConfiguration environmentProviderConfigs = _serverConf.subset(
+        Server.PREFIX_OF_CONFIG_OF_ENVIRONMENT_PROVIDER_FACTORY);
+
+    if (environmentProviderConfigs.toMap().isEmpty()) {
+      LOGGER.info("No environment provider config values provided for server property: {}",
+          Server.PREFIX_OF_CONFIG_OF_ENVIRONMENT_PROVIDER_FACTORY);
+      return null;

Review comment:
       A null return type for a map leads to 3 states: null/empty/non-empty. I see you are handling the null case, but returning an empty map would imply the same thing? i.e. there are no overrides?




-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org