You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kylin.apache.org by GitBox <gi...@apache.org> on 2022/09/29 07:15:22 UTC
[GitHub] [kylin] hit-lacus commented on a diff in pull request #1991: Improve performance of getSubstitutor
hit-lacus commented on code in PR #1991:
URL: https://github.com/apache/kylin/pull/1991#discussion_r983149665
##########
src/core-common/src/main/java/org/apache/kylin/common/PropertiesDelegate.java:
##########
@@ -39,34 +51,84 @@ public class PropertiesDelegate extends Properties {
@EqualsAndHashCode.Include
private final transient IExternalConfigLoader configLoader;
+ private final Map delegation;
+
public PropertiesDelegate(Properties properties, IExternalConfigLoader configLoader) {
- if(configLoader != null) this.properties.putAll(configLoader.getProperties());
this.properties.putAll(properties);
this.configLoader = configLoader;
+ if (configLoader == null) {
+ this.delegation = this.properties;
+ } else if (configLoader instanceof KylinExternalConfigLoader) {
+ this.delegation = new CompositeMapView(((ICachedExternalConfigLoader)this.configLoader).getPropertyEntries(), this.properties);
+ } else if (configLoader instanceof NacosExternalConfigLoader) {
+ this.delegation = new CompositeMapView(((ICachedExternalConfigLoader)this.configLoader).getPropertyEntries(), this.properties);
Review Comment:
Sorry, that is my mistake, I will make it right.
--
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: issues-unsubscribe@kylin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org