klsince commented on code in PR #10785:
URL: https://github.com/apache/pinot/pull/10785#discussion_r1203118997
##########
pinot-spi/src/main/java/org/apache/pinot/spi/env/PinotConfiguration.java:
##########
@@ -356,7 +356,14 @@ public long getProperty(String name, long defaultValue) {
* @return the property String value. Fallback to default value if missing.
*/
public String getProperty(String name, String defaultValue) {
- Object rawProperty = getRawProperty(name, defaultValue);
+ String relaxedPropertyName = relaxPropertyName(name);
+ if (!_configuration.containsKey(relaxedPropertyName)) {
+ return defaultValue;
+ }
+ Object rawProperty = _configuration.getProperty(relaxedPropertyName);
+ if (CommonsConfigurationUtils.needInterpolate(rawProperty)) {
+ return _configuration.getString(relaxPropertyName(name), defaultValue);
+ }
if (rawProperty instanceof List) {
return StringUtils.join(((ArrayList) rawProperty).toArray(), ',');
Review Comment:
fixed this according to an idea proposed by @dd-willgan in a comment early
on. I didn't get it but now I see what's going on with multi-value
interpolation. I expanded unit tests for such case. pls review.
--
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]