Source:
private static void validateTierConfigList(@Nullable List<TierConfig> tierConfigList) { if (tierConfigList == null) { return; } Set<String> tierNames = new HashSet<>(); for (TierConfig tierConfig : tierConfigList) { String tierName = tierConfig.getName(); Preconditions.checkState(!tierName.isEmpty()); Preconditions.checkState(!tierNames.contains(tierName), "Tier name: %s already exists in tier configs", tierName); tierNames.add(tierName); String segmentSelectorType = tierConfig.getSegmentSelectorType(); String segmentAge = tierConfig.getSegmentAge(); if (segmentSelectorType.equalsIgnoreCase(TierFactory.TIME_BASED_SEGMENT_SELECTOR_TYPE)) { Preconditions .checkState(segmentAge != null, "Must provide 'segmentAge' for segmentSelectorType: %s in tier: %s", segmentSelectorType, tierName); Preconditions.checkState(TimeUtils.isPeriodValid(segmentAge), "segmentAge: %s must be a valid period string (eg. 30d, 24h) in tier: %s", segmentAge, tierName); } else { throw new IllegalStateException( "Unsupported segmentSelectorType: " + segmentSelectorType + " in tier: " + tierName); } String storageType = tierConfig.getStorageType(); String serverTag = tierConfig.getServerTag(); if (storageType.equalsIgnoreCase(TierFactory.PINOT_SERVER_STORAGE_TYPE)) { Preconditions .checkState(serverTag != null, "Must provide 'serverTag' for storageType: %s in tier: %s", storageType, tierName); Preconditions.checkState(TagNameUtils.isServerTag(serverTag), "serverTag: %s must have a valid server tag format (<tenantName>_OFFLINE or <tenantName>_REALTIME) in tier: %s", serverTag, tierName); } else { throw new IllegalStateException("Unsupported storageType: " + storageType + " in tier: " + tierName); } } }

Target:
private static void validateTierConfigList(@Nullable List<TierConfig> tierConfigList) { if (tierConfigList == null) { return; } Set<String> tierNames = new HashSet<>(); for (TierConfig tierConfig : tierConfigList) { String tierName = tierConfig.getName(); Preconditions.checkState(!tierName.isEmpty(), "Tier name cannot be blank"); Preconditions.checkState(tierNames.add(tierName), "Tier name: %s already exists in tier configs", tierName); String segmentSelectorType = tierConfig.getSegmentSelectorType(); String segmentAge = tierConfig.getSegmentAge(); if (segmentSelectorType.equalsIgnoreCase(TierFactory.TIME_SEGMENT_SELECTOR_TYPE)) { Preconditions .checkState(segmentAge != null, "Must provide 'segmentAge' for segmentSelectorType: %s in tier: %s", segmentSelectorType, tierName); Preconditions.checkState(TimeUtils.isPeriodValid(segmentAge), "segmentAge: %s must be a valid period string (eg. 30d, 24h) in tier: %s", segmentAge, tierName); } else { throw new IllegalStateException( "Unsupported segmentSelectorType: " + segmentSelectorType + " in tier: " + tierName); } String storageType = tierConfig.getStorageType(); String serverTag = tierConfig.getServerTag(); if (storageType.equalsIgnoreCase(TierFactory.PINOT_SERVER_STORAGE_TYPE)) { Preconditions .checkState(serverTag != null, "Must provide 'serverTag' for storageType: %s in tier: %s", storageType, tierName); Preconditions.checkState(TagNameUtils.isServerTag(serverTag), "serverTag: %s must have a valid server tag format (<tenantName>_OFFLINE or <tenantName>_REALTIME) in tier: %s", serverTag, tierName); } else { throw new IllegalStateException("Unsupported storageType: " + storageType + " in tier: " + tierName); } } }