KKcorps commented on a change in pull request #6119:
URL: https://github.com/apache/incubator-pinot/pull/6119#discussion_r502300739



##########
File path: 
pinot-common/src/main/java/org/apache/pinot/common/utils/helix/HelixHelper.java
##########
@@ -474,6 +480,12 @@ public IdealState apply(@Nullable IdealState idealState) {
    * TODO: refactor code to use this method if applicable to reuse instance 
configs in order to reduce ZK accesses
    */
   public static Set<String> getBrokerInstancesForTenant(List<InstanceConfig> 
instanceConfigs, String tenant) {
-    return new HashSet<>(HelixHelper.getInstancesWithTag(instanceConfigs, 
TagNameUtils.getBrokerTagForTenant(tenant)));
+    return getBrokerInstanceConfigsForTenant(instanceConfigs, 
tenant).stream().map(InstanceConfig::getInstanceName).collect(
+        Collectors.toSet());
   }
+
+  public static Set<InstanceConfig> 
getBrokerInstanceConfigsForTenant(List<InstanceConfig> instanceConfigs, String 
tenant) {
+    return new 
HashSet<>(HelixHelper.getInstancesConfigsWithTag(instanceConfigs, 
TagNameUtils.getBrokerTagForTenant(tenant)));

Review comment:
       done




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