npawar 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_r274503263
##########
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:
This whole method is not something I've added. I've just wrapped the code
into a method. And I can see addTable is used in multiple tests. I'll check
what all those cover and add if specific cases are missing
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]