You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@helix.apache.org by GitBox <gi...@apache.org> on 2022/04/01 05:45:46 UTC

[GitHub] [helix] xyuanlu commented on a change in pull request #2005: Populate helix cloud property using cloud config

xyuanlu commented on a change in pull request #2005:
URL: https://github.com/apache/helix/pull/2005#discussion_r840251487



##########
File path: helix-core/src/main/java/org/apache/helix/HelixCloudProperty.java
##########
@@ -69,16 +69,28 @@
   // Other customized properties that may be used.
   private Properties _customizedCloudProperties = new Properties();
 
+  public HelixCloudProperty() {
+    setCloudEnabled(false);
+  }
+
   /**
    * Initialize Helix Cloud Property based on the provider
    * @param
    */
   public HelixCloudProperty(CloudConfig cloudConfig) {
+    this();
+    populateFieldsWithCloudConfig(cloudConfig);
+  }
+
+  public void populateFieldsWithCloudConfig(CloudConfig cloudConfig) {
+    if (cloudConfig == null || !cloudConfig.isCloudEnabled()) {
+      reset();

Review comment:
       Can we create a default CloudConfig using `buildEmptyCloudConfig()` and populate the fields in cloudConfig to cloudProperty? 
   It would be simpler I guess. 




-- 
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: reviews-unsubscribe@helix.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org