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 2019/07/22 23:50:03 UTC

[GitHub] [incubator-pinot] jackjlli commented on a change in pull request #4449: Add resource config for lead controller resource

jackjlli commented on a change in pull request #4449: Add resource config for lead controller resource
URL: https://github.com/apache/incubator-pinot/pull/4449#discussion_r306078706
 
 

 ##########
 File path: pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/util/HelixSetupUtils.java
 ##########
 @@ -177,5 +180,16 @@ private static void createLeadControllerResourceIfNeeded(String helixClusterName
 
       helixAdmin.addResource(helixClusterName, LEAD_CONTROLLER_RESOURCE_NAME, idealState);
     }
+
+    // Create resource config for lead controller resource if it doesn't exist
+    ResourceConfig resourceConfig = configAccessor.getResourceConfig(helixClusterName, LEAD_CONTROLLER_RESOURCE_NAME);
+    if (resourceConfig == null) {
+      resourceConfig = new ResourceConfig(LEAD_CONTROLLER_RESOURCE_NAME);
+    }
+    // Set RESOURCE_ENABLED to false if it's absent in resource config
+    if (resourceConfig.getSimpleConfig("RESOURCE_ENABLED") == null) {
 
 Review comment:
   I'd love to but `ResouceConfig` isn't a hashmap and there's no such method for now. :)

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


With regards,
Apache Git Services

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