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 2022/09/07 20:56:34 UTC

[GitHub] [pinot] klsince commented on a diff in pull request #9306: TierBasedSegmentDirectoryLoader to keep segments in multi-datadir

klsince commented on code in PR #9306:
URL: https://github.com/apache/pinot/pull/9306#discussion_r965290343


##########
pinot-common/src/main/java/org/apache/pinot/common/utils/config/TierConfigUtils.java:
##########
@@ -47,6 +51,27 @@ public static boolean shouldRelocateToTiers(TableConfig tableConfig) {
     return CollectionUtils.isNotEmpty(tableConfig.getTierConfigsList());
   }
 
+  public static String getDataDirFromTierConfig(String tableNameWithType, String tierName, TableConfig tableConfig) {
+    List<TierConfig> tierCfgs = tableConfig.getTierConfigsList();
+    Preconditions.checkState(CollectionUtils.isNotEmpty(tierCfgs), "No tierConfigs for table: %s", tableNameWithType);
+    TierConfig tierCfg = null;
+    for (TierConfig tc : tierCfgs) {
+      if (tierName.equalsIgnoreCase(tc.getName())) {

Review Comment:
   I saw insensitive case comparison used in a place. but on a double check, there are also Maps built with tier name directly. It seems simpler to always do case sensitive comparison on tier name. will update. 



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