jackjlli commented on a change in pull request #4047: Create leadControllerResource in helix cluster URL: https://github.com/apache/incubator-pinot/pull/4047#discussion_r290031825
########## File path: pinot-common/src/main/java/org/apache/pinot/common/config/TagNameUtils.java ########## @@ -45,7 +46,18 @@ public static boolean hasValidServerTagSuffix(String tagName) { return false; } - public static TenantRole getTenantRoleFromTag(String tagName) throws InvalidConfigException { + public static boolean isServerTag(String tagName) + throws InvalidConfigException { + return TenantRole.SERVER == getTenantRoleFromTag(tagName); + } + + public static boolean isBrokerTags(String tagName) + throws InvalidConfigException { + return TenantRole.BROKER == getTenantRoleFromTag(tagName); + } + + // Make this method private to avoid exposing null out of this class. + private static TenantRole getTenantRoleFromTag(String tagName) throws InvalidConfigException { Review comment: Discussed with @Jackie-Jiang. The exception should have been caught when table config was added/updated. So there's no need to keep the validation check of tag name here. ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org