zzcclp commented on a change in pull request #1525:
URL: https://github.com/apache/kylin/pull/1525#discussion_r550371200
##########
File path:
core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java
##########
@@ -206,12 +207,15 @@ protected Properties getProperties(Collection<String>
propertyKeys) {
}
protected StrSubstitutor getSubstitutor() {
- // env > properties
- final Map<String, Object> all = Maps.newHashMap();
- all.putAll((Map) properties);
- all.putAll(System.getenv());
+ return new StrSubstitutor(getPropertiesMap());
+ }
- return new StrSubstitutor(all);
+ protected Map<String, Object> getPropertiesMap() {
+ if (propertiesMap.isEmpty()) {
+ propertiesMap.putAll((Map) properties);
+ propertiesMap.putAll(System.getenv());
+ }
Review comment:
When calling 'getPropertiesMap()' at the first time, it put all values
of properties and System.getenv() into propertiesMap, but if there are some
values be changed, the values in propertiesMap cann't be changed too?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]