dasahcc commented on a change in pull request #849: Add REST APIs for get, set, 
update RestConfig
URL: https://github.com/apache/helix/pull/849#discussion_r389901618
 
 

 ##########
 File path: helix-core/src/main/java/org/apache/helix/ConfigAccessor.java
 ##########
 @@ -605,6 +606,62 @@ public RESTConfig getRESTConfig(String clusterName) {
     return new RESTConfig(record);
   }
 
+  /**
+   * Set RestConfig of a given cluster
+   * @param clusterName the cluster id
+   * @param restConfig the RestConfig to be set to the cluster
+   */
+  public void setRESTConfig(String clusterName, RESTConfig restConfig) {
+    updateRESTConfig(clusterName, restConfig, true);
+  }
+
+  /**
+   * Update RestConfig of a given cluster
+   * @param clusterName the cluster id
+   * @param restConfig the new RestConfig to be set to the cluster
+   */
+  public void updateRESTConfig(String clusterName, RESTConfig restConfig) {
+    updateRESTConfig(clusterName, restConfig, false);
+  }
+
+  private void updateRESTConfig(String clusterName, RESTConfig restConfig, 
boolean overwrite) {
 
 Review comment:
   Is this necessary? We should have update function with scope arugment,right?

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to