Jackie-Jiang commented on a change in pull request #4865: Misc clean up for
PinotHelixResourceManager
URL: https://github.com/apache/incubator-pinot/pull/4865#discussion_r351462431
##########
File path:
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/PinotHelixResourceManager.java
##########
@@ -1321,19 +1304,15 @@ public void updateIndexingConfigFor(String tableName,
TableType type, IndexingCo
setExistingTableConfig(tableConfig);
}
- private void handleBrokerResource(@Nonnull final String tableName, @Nonnull
final List<String> brokersForTenant) {
- LOGGER.info("Updating BrokerResource IdealState for table: {}", tableName);
- HelixHelper
- .updateIdealState(_helixZkManager, Helix.BROKER_RESOURCE_INSTANCE, new
Function<IdealState, IdealState>() {
- @Override
- public IdealState apply(@Nullable IdealState idealState) {
- Preconditions.checkNotNull(idealState);
- for (String broker : brokersForTenant) {
- idealState.setPartitionState(tableName, broker,
BrokerOnlineOfflineStateModel.ONLINE);
- }
- return idealState;
- }
- }, RetryPolicies.exponentialBackoffRetryPolicy(5, 500L, 2.0f));
+ private void handleBrokerResource(String tableNameWithType, List<String>
brokersForTenant) {
Review comment:
Inline it into the addTable() method to be more clear
----------------------------------------------------------------
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]