kylin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kangkai...@apache.org
Subject [23/50] [abbrv] kylin git commit: KYLIN-2652 Make kylinConfig threadsafe in CubeVisitService
Date Fri, 07 Jul 2017 08:38:25 GMT
KYLIN-2652 Make kylinConfig threadsafe in CubeVisitService


Project: http://git-wip-us.apache.org/repos/asf/kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/a1e055a6
Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/a1e055a6
Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/a1e055a6

Branch: refs/heads/KYLIN-2606
Commit: a1e055a6b448f7e797ea29bc97e84325b3056638
Parents: 772a95f
Author: kangkaisen <kangkaisen@live.com>
Authored: Fri May 26 12:30:17 2017 +0800
Committer: kangkaisen <kangkaisen@live.com>
Committed: Thu Jun 29 21:20:22 2017 +0800

----------------------------------------------------------------------
 .../hbase/cube/v2/coprocessor/endpoint/CubeVisitService.java  | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/a1e055a6/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/coprocessor/endpoint/CubeVisitService.java
----------------------------------------------------------------------
diff --git a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/coprocessor/endpoint/CubeVisitService.java
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/coprocessor/endpoint/CubeVisitService.java
index cde127e..c66af66 100644
--- a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/coprocessor/endpoint/CubeVisitService.java
+++ b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/coprocessor/endpoint/CubeVisitService.java
@@ -238,9 +238,8 @@ public class CubeVisitService extends CubeVisitProtos.CubeVisitService
implement
             region.startRegionOperation();
 
             // if user change kylin.properties on kylin server, need to manually redeploy
coprocessor jar to update KylinConfig of Env.
-            String serverPropString = request.getKylinProperties();
-            KylinConfig.setKylinConfigInEnvIfMissing(serverPropString);
-            KylinConfig kylinConfig = KylinConfig.getInstanceFromEnv();
+            KylinConfig kylinConfig = KylinConfig.createKylinConfig(request.getKylinProperties());
+            KylinConfig.setKylinConfigThreadLocal(kylinConfig);
 
             debugGitTag = region.getTableDesc().getValue(IRealizationConstants.HTableGitTag);
 
@@ -425,8 +424,6 @@ public class CubeVisitService extends CubeVisitProtos.CubeVisitService
implement
 
     @Override
     public void stop(CoprocessorEnvironment env) throws IOException {
-        // destroy KylinConfig when coprocessor stop
-        KylinConfig.destroyInstance();
     }
 
     @Override


Mime
View raw message