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/15 12:30:05 UTC
[GitHub] [kylin] zznlime commented on a diff in pull request #1969: Kylin 5256 Add a cache for the system property get by the optional config in KylinConfigBase
zznlime commented on code in PR #1969:
URL: https://github.com/apache/kylin/pull/1969#discussion_r971924698
##########
src/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java:
##########
@@ -111,6 +110,33 @@ public abstract class KylinConfigBase implements Serializable {
protected static final Map<String, String> STATIC_SYSTEM_ENV = new ConcurrentHashMap<>(System.getenv());
+ // It's a workaround to avoid lock in bottom hash table
+ // It can be removed after updating JDK to 11
+ protected static final ConcurrentHashMap<Object, Object> STATIC_SYSTEM_PROPERTY = new ConcurrentHashMap<>(
+ System.getProperties());
+
+ protected static String getSystemProperty(String key) {
+ Object oval = STATIC_SYSTEM_PROPERTY.get(key);
Review Comment:
Have added checkKey() for getSystemProperty.
--
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