dongxiaoman commented on a change in pull request #7064:
URL: https://github.com/apache/incubator-pinot/pull/7064#discussion_r659221902



##########
File path: 
pinot-common/src/main/java/org/apache/pinot/common/utils/helix/HelixHelper.java
##########
@@ -495,4 +498,76 @@ public IdealState apply(@Nullable IdealState idealState) {
       String tenant) {
     return new HashSet<>(getInstancesConfigsWithTag(instanceConfigs, 
TagNameUtils.getBrokerTagForTenant(tenant)));
   }
+
+  /**
+   * Update host config in Helix if needed.
+   * The hostname and port cannot be null or empty;
+   * The port will be validated against integer.
+   * There is a callback lambda that can provide the tags if needed.
+   * For example () -> ImmutableList.of("Default_tenant")
+   * @param helixManager The Participant Manager
+   * @param instanceId the Helix instance id
+   * @param hostName the Hostname to update
+   * @param hostPort the host port to update
+   * @param getDefaultTags Something like () -> 
ImmutableList.of("Default_tenant") to provide default tags
+   */
+  public static void updateInstanceConfigIfNeeded(HelixManager helixManager, 
String instanceId, String hostName, String hostPort, Supplier<List<String>> 
getDefaultTags) {

Review comment:
       Refactored 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.

To unsubscribe, e-mail: [email protected]

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