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/07/17 00:52:05 UTC

[GitHub] [incubator-pinot] jackjlli commented on a change in pull request #4323: [Controller Separation] Add logic for lead controller resource

jackjlli commented on a change in pull request #4323: [Controller Separation] Add logic for lead controller resource
URL: https://github.com/apache/incubator-pinot/pull/4323#discussion_r304181910
 
 

 ##########
 File path: pinot-common/src/main/java/org/apache/pinot/common/utils/helix/HelixHelper.java
 ##########
 @@ -500,4 +503,55 @@ public IdealState apply(IdealState idealState) {
   public static Set<String> getBrokerInstancesForTenant(List<InstanceConfig> instanceConfigs, String tenant) {
     return new HashSet<>(HelixHelper.getInstancesWithTag(instanceConfigs, TagNameUtils.getBrokerTagForTenant(tenant)));
   }
+
+  /**
+   * Gets hash code for table.
+   * Note: This method CANNOT be changed when lead controller resource has been enabled.
+   * Otherwise it will assign different controller for the same table, which will mess up the controller periodic tasks and realtime segment completion.
+   * @param rawTableName table name
+   * @return hash code
+   */
+  private static int getHashCodeForTable(String rawTableName) {
+    return rawTableName.hashCode();
 
 Review comment:
   Just did benchmark different partition functions and put the result in the description of this PR.

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