saurabhd336 commented on code in PR #11077:
URL: https://github.com/apache/pinot/pull/11077#discussion_r1261988572
##########
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/PinotHelixResourceManager.java:
##########
@@ -4128,6 +4129,29 @@ public PeriodicTaskInvocationResponse
invokeControllerPeriodicTask(String tableN
return new PeriodicTaskInvocationResponse(periodicTaskRequestId,
messageCount > 0);
}
+ /**
+ * Construct a map of all the tenants and their respective minimum server
requirements.
+ * The minimum server requirement is computed by iterating over all the
tables of the tenant and
+ * find the table with maximum replication.
+ * @return map of tenants and their minimum server requirements
+ */
+ public Map<String, Integer> minimumServersRequiredForTenants() {
+ Map<String, Integer> tenantMinServerMap = new HashMap<>();
+ getAllServerTenantNames().forEach(tenant -> tenantMinServerMap.put(tenant,
0));
+ for (String table : getAllTables()) {
+ TableConfig tableConfig = getTableConfig(table);
Review Comment:
Could we fetch the tableConfigs all at once instead? We may pass
list<TableConfigs> to this function
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]