kylin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From qhz...@apache.org
Subject [50/52] [abbrv] incubator-kylin git commit: KYLIN-797 merge steven zhang’s change in 0.8 and organize the CacheService.java
Date Mon, 27 Jul 2015 09:21:52 GMT
KYLIN-797 merge steven zhang’s change in 0.8 and organize the CacheService.java


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

Branch: refs/heads/0.8
Commit: 3d04704e8999855f2a2bad6778ba525d516c82af
Parents: b02c2e6
Author: shaofengshi <shaofengshi@apache.org>
Authored: Mon Jul 27 13:36:34 2015 +0800
Committer: shaofengshi <shaofengshi@apache.org>
Committed: Mon Jul 27 13:36:34 2015 +0800

----------------------------------------------------------------------
 .../java/org/apache/kylin/common/util/AbstractKylinTestCase.java | 1 -
 .../src/main/java/org/apache/kylin/cube/CubeDescManager.java     | 4 ++++
 .../main/java/org/apache/kylin/rest/service/CacheService.java    | 4 ----
 3 files changed, 4 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/3d04704e/core-common/src/test/java/org/apache/kylin/common/util/AbstractKylinTestCase.java
----------------------------------------------------------------------
diff --git a/core-common/src/test/java/org/apache/kylin/common/util/AbstractKylinTestCase.java
b/core-common/src/test/java/org/apache/kylin/common/util/AbstractKylinTestCase.java
index b47816b..c9e785a 100644
--- a/core-common/src/test/java/org/apache/kylin/common/util/AbstractKylinTestCase.java
+++ b/core-common/src/test/java/org/apache/kylin/common/util/AbstractKylinTestCase.java
@@ -39,7 +39,6 @@ public abstract class AbstractKylinTestCase {
     public static final String[] SERVICES_WITH_CACHE = {//
     "org.apache.kylin.cube.CubeManager",//
             "org.apache.kylin.cube.CubeDescManager", //
-            "org.apache.kylin.cube.cuboid.Cuboid", //
             "org.apache.kylin.invertedindex.IIDescManager",//
             "org.apache.kylin.invertedindex.IIManager",//
             "org.apache.kylin.storage.hybrid.HybridManager",

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/3d04704e/core-cube/src/main/java/org/apache/kylin/cube/CubeDescManager.java
----------------------------------------------------------------------
diff --git a/core-cube/src/main/java/org/apache/kylin/cube/CubeDescManager.java b/core-cube/src/main/java/org/apache/kylin/cube/CubeDescManager.java
index d406da1..08ec53f 100644
--- a/core-cube/src/main/java/org/apache/kylin/cube/CubeDescManager.java
+++ b/core-cube/src/main/java/org/apache/kylin/cube/CubeDescManager.java
@@ -25,6 +25,7 @@ import org.apache.kylin.common.persistence.ResourceStore;
 import org.apache.kylin.common.persistence.Serializer;
 import org.apache.kylin.common.restclient.Broadcaster;
 import org.apache.kylin.common.restclient.CaseInsensitiveStringCache;
+import org.apache.kylin.cube.cuboid.Cuboid;
 import org.apache.kylin.cube.model.CubeDesc;
 import org.apache.kylin.cube.model.validation.CubeMetadataValidator;
 import org.apache.kylin.cube.model.validation.ValidateContext;
@@ -117,6 +118,7 @@ public class CubeDescManager {
 
         // Here replace the old one
         cubeDescMap.putLocal(ndesc.getName(), ndesc);
+        Cuboid.reloadCache(name);
         return ndesc;
     }
 
@@ -180,11 +182,13 @@ public class CubeDescManager {
         String path = cubeDesc.getResourcePath();
         getStore().deleteResource(path);
         cubeDescMap.remove(cubeDesc.getName());
+        Cuboid.reloadCache(cubeDesc.getName());
     }
 
     // remove cubeDesc
     public void removeLocalCubeDesc(String name) throws IOException {
         cubeDescMap.removeLocal(name);
+        Cuboid.reloadCache(name);
     }
 
     private void reloadAllCubeDesc() throws IOException {

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/3d04704e/server/src/main/java/org/apache/kylin/rest/service/CacheService.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/kylin/rest/service/CacheService.java b/server/src/main/java/org/apache/kylin/rest/service/CacheService.java
index 1cf1fe0..9bc2f8c 100644
--- a/server/src/main/java/org/apache/kylin/rest/service/CacheService.java
+++ b/server/src/main/java/org/apache/kylin/rest/service/CacheService.java
@@ -25,7 +25,6 @@ import org.apache.kylin.common.restclient.Broadcaster;
 import org.apache.kylin.cube.CubeDescManager;
 import org.apache.kylin.cube.CubeInstance;
 import org.apache.kylin.cube.CubeManager;
-import org.apache.kylin.cube.cuboid.Cuboid;
 import org.apache.kylin.invertedindex.IIDescManager;
 import org.apache.kylin.invertedindex.IIManager;
 import org.apache.kylin.metadata.MetadataManager;
@@ -84,7 +83,6 @@ public class CacheService extends BasicService {
                     break;
                 case CUBE_DESC:
                     getCubeDescManager().reloadCubeDescLocal(cacheKey);
-                    Cuboid.reloadCache(cacheKey);
                     break;
                 case PROJECT:
                     ProjectInstance projectInstance = getProjectManager().reloadProjectLocal(cacheKey);
@@ -113,7 +111,6 @@ public class CacheService extends BasicService {
                     MetadataManager.clearCache();
                     CubeDescManager.clearCache();
                     CubeManager.clearCache();
-                    Cuboid.clearCache();
                     IIDescManager.clearCache();
                     IIManager.clearCache();
                     HybridManager.clearCache();
@@ -141,7 +138,6 @@ public class CacheService extends BasicService {
                     break;
                 case CUBE_DESC:
                     getCubeDescManager().removeLocalCubeDesc(cacheKey);
-                    Cuboid.reloadCache(cacheKey);
                     break;
                 case PROJECT:
                     ProjectManager.clearCache();


Mime
View raw message