Jackie-Jiang commented on a change in pull request #6073:
URL: https://github.com/apache/incubator-pinot/pull/6073#discussion_r497231638



##########
File path: 
pinot-core/src/main/java/org/apache/pinot/core/util/TableConfigUtils.java
##########
@@ -76,10 +79,41 @@ public static void validate(TableConfig tableConfig, 
@Nullable Schema schema) {
     validateFieldConfigList(tableConfig.getFieldConfigList(), schema);
   }
 
+  /**
+   * Validates all table config including tenant config. This is specifically 
invoked
+   * during table config creation, update or validate API calls.
+   */
+  public static void validate(TableConfig tableConfig, @Nullable Schema 
schema, Set<String> serverTenants,
+      Set<String> brokerTenants) {
+    validate(tableConfig, schema);
+    validateTenants(tableConfig, serverTenants, brokerTenants);
+  }
+
+  /**
+   * Ensures a valid tenant config is provided in the table config.
+   * Ensures the broker and server tenant names are valid.
+   */
+  private static void validateTenants(TableConfig tableConfig, Set<String> 
serverTenants, Set<String> brokerTenants) {

Review comment:
       This is the same check as 
`PinotHelixResourceManager.validateTableTenantConfig(TableConfig tableConfig)`




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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to