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/10/01 19:11:52 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_r498459982



##########
File path: pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/PinotHelixResourceManager.java
##########
@@ -1374,6 +1378,14 @@ private void assignInstances(TableConfig tableConfig, boolean override) {
    */
   public void updateTableConfig(TableConfig tableConfig)
       throws IOException {
+    TenantConfig tenantConfig = tableConfig.getTenantConfig();
+    String brokerTag = tenantConfig.getBroker();
+    String serverTag = tenantConfig.getServer();
+    if (brokerTag == null || serverTag == null) {
+      if (!_isSingleTenantCluster) {
+        throw new InvalidTableConfigException("server and broker tenants must be specified for multi-tenant cluster");
+      }
+    }

Review comment:
       You should put default tenant here if it is single-tenant cluster, similar to `addTable()`
   
   You may extract this part into a helper method




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