You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2020/09/30 04:15:43 UTC

[GitHub] [incubator-pinot] Jackie-Jiang commented on a change in pull request #6073: Adding more table config validation

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:
users@infra.apache.org



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