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 2019/04/11 15:57:53 UTC

[GitHub] [incubator-pinot] mcvsubbu commented on a change in pull request #4103: Add validations to table config before updating a table config

mcvsubbu commented on a change in pull request #4103: Add validations to table config before updating a table config
URL: https://github.com/apache/incubator-pinot/pull/4103#discussion_r274496650
 
 

 ##########
 File path: pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/PinotHelixResourceManager.java
 ##########
 @@ -1160,7 +1113,60 @@ public void addTable(@Nonnull TableConfig tableConfig)
         throw new InvalidTableConfigException("UnSupported table type: " + tableType);
     }
 
-    handleBrokerResource(tableNameWithType, brokersForTenant);
+    String brokerTenantName = TagNameUtils.getBrokerTagForTenant(tableConfig.getTenantConfig().getBroker());
+    handleBrokerResource(tableNameWithType, HelixHelper.getInstancesWithTag(_helixZkManager, brokerTenantName));
+  }
+
+  /**
+   * Validates the tenant config for the table
+   */
+  private void validateTableTenantConfig(TableConfig tableConfig, String tableNameWithType, TableType tableType) {
 
 Review comment:
   Will be great if you can add a unit test for this. It will mean mocking the helix get tagged instances call, I suppose.

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


With regards,
Apache Git Services

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