You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "sylph-eu (via GitHub)" <gi...@apache.org> on 2023/05/09 10:42:42 UTC

[GitHub] [pinot] sylph-eu commented on a diff in pull request #10746: [feature] Consider tierConfigs when assigning new offline segment

sylph-eu commented on code in PR #10746:
URL: https://github.com/apache/pinot/pull/10746#discussion_r1188470490


##########
pinot-common/src/main/java/org/apache/pinot/common/utils/config/TierConfigUtils.java:
##########
@@ -63,6 +68,33 @@ public static String getDataDirForTier(TableConfig tableConfig, String tierName)
     return getDataDirForTier(tableConfig, tierName, Collections.emptyMap());
   }
 
+  /**
+   * Compute default instance partitions for every configured tier
+   *
+   * @return a map with tier names as keys, and default instance partitions as values
+   */
+  public static Map<String, InstancePartitions> getTierToInstancePartitionsMap(String tableNameWithType,

Review Comment:
   There's logic specific to pinot-controller inside TableRabalance.getTierToInstancePartitionsMap, please see the usage of `InstanceAssignmentDriver`. Moving the logic to pinot-common would either create unwanted (cyclic) dependency to pinot-controller, or would require refactoring of plenty of modules.



-- 
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: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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