klsince commented on code in PR #15998:
URL: https://github.com/apache/pinot/pull/15998#discussion_r2138769286
##########
pinot-server/src/main/java/org/apache/pinot/server/starter/helix/HelixInstanceDataManagerConfig.java:
##########
@@ -138,17 +140,28 @@ public HelixInstanceDataManagerConfig(PinotConfiguration
serverConfig)
_upsertConfig = serverConfig.subset(UPSERT_CONFIG_PREFIX);
_dedupConfig = serverConfig.subset(DEDUP_CONFIG_PREFIX);
+ // Load default tier configurations
+ // Properties are prefixed with pinot.server.instance.defaultTierConfigs.
+ // e.g. pinot.server.instance.defaultTierConfigs.myKey = myValue
+ // The resulting defaultTierProperties map will be { "myKey": "myValue" }
+ Map<String, String> defaultTierProperties = new HashMap<>();
+ serverConfig.subset(DEFAULT_TIER_CONFIG_KEY_PREFIX)
+ .toMap()
+ .forEach((key, value) -> defaultTierProperties.put(key,
String.valueOf(value)));
+ Map<String, String> unmodifiableDefaultTierProperties =
Collections.unmodifiableMap(defaultTierProperties);
+
+ _tierConfigs = new DefaultedMap<>(unmodifiableDefaultTierProperties);
Review Comment:
can add a comment that if a tier is not found in this map, then this map of
default configs will be used.
and better add some tests for this new behavior
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]