lei-xia commented on a change in pull request #1129:
URL: https://github.com/apache/helix/pull/1129#discussion_r455914274



##########
File path: 
helix-core/src/main/java/org/apache/helix/controller/rebalancer/topology/Topology.java
##########
@@ -230,16 +220,57 @@ private boolean isInstanceEnabled(ClusterConfig 
clusterConfig, String instanceNa
         || !clusterConfig.getDisabledInstances().containsKey(instanceName)));
   }
 
+  /**
+   * Populate clusterTopologyKeys and defaultDomainPathValues from 
clusterConfig
+   *
+   * @param clusterTopologyKeys       out parameter. LinkedHashSet to be 
populated for cluster
+   *                                  topology keys. The set will remain empty 
if topology aware is
+   *                                  not enabled or this cluster uses zone 
instead of domains.
+   * @param defaultDomainPathValues   out parameter. Map to be populated for 
all default path keys.
+   *                                  The map will remain empty if topology 
aware is not enabled or
+   *                                  this cluster uses zone instead of 
domains.
+   * @return lastValidType in clusterConfig.topology
+   */
+  private static String populateClusterTopologySetting(ClusterConfig 
clusterConfig,
+      LinkedHashSet<String> clusterTopologyKeys /*OUT*/,
+      Map<String, String> defaultDomainPathValues /*OUT*/) {

Review comment:
       Using input parameters to populate output values is generally not a best 
practice, maybe fine given this is just private method. But let us see if we 
find a better way to return these values. 




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



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

Reply via email to