kylin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From liy...@apache.org
Subject [09/25] incubator-kylin git commit: KYLIN-639 cache not flushed when admin click “Reload metadata” on web UI.
Date Sat, 21 Mar 2015 00:28:42 GMT
KYLIN-639 cache not flushed when admin click “Reload metadata” on web UI.

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

Branch: refs/heads/master
Commit: ca08b5c4e7f33c11887bf30333cb169d82056b96
Parents: fd86a8e
Author: Shao Feng, Shi <shaoshi@ebay.com>
Authored: Fri Mar 13 16:18:05 2015 +0800
Committer: Shao Feng, Shi <shaoshi@ebay.com>
Committed: Fri Mar 13 16:18:05 2015 +0800

----------------------------------------------------------------------
 .../org/apache/kylin/common/restclient/Broadcaster.java   |  2 +-
 .../java/org/apache/kylin/rest/service/CacheService.java  | 10 ++++++++++
 webapp/app/js/services/cache.js                           |  2 +-
 3 files changed, 12 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/ca08b5c4/common/src/main/java/org/apache/kylin/common/restclient/Broadcaster.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/kylin/common/restclient/Broadcaster.java b/common/src/main/java/org/apache/kylin/common/restclient/Broadcaster.java
index 58660ff..7b56a03 100644
--- a/common/src/main/java/org/apache/kylin/common/restclient/Broadcaster.java
+++ b/common/src/main/java/org/apache/kylin/common/restclient/Broadcaster.java
@@ -137,7 +137,7 @@ public class Broadcaster {
     }
 
     public static enum TYPE {
-        CUBE("cube"), CUBE_DESC("cube_desc"), PROJECT("project"), INVERTED_INDEX("inverted_index"),
INVERTED_INDEX_DESC("ii_desc"), TABLE("table"), DATA_MODEL("data_model");
+        ALL("all"), CUBE("cube"), CUBE_DESC("cube_desc"), PROJECT("project"), INVERTED_INDEX("inverted_index"),
INVERTED_INDEX_DESC("ii_desc"), TABLE("table"), DATA_MODEL("data_model");
         private String text;
 
         private TYPE(String text) {

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/ca08b5c4/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 d4b0d32..7c7c014 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
@@ -20,7 +20,9 @@ package org.apache.kylin.rest.service;
 
 import org.apache.kylin.common.restclient.Broadcaster;
 import org.apache.kylin.cube.CubeDescManager;
+import org.apache.kylin.cube.CubeManager;
 import org.apache.kylin.invertedindex.IIDescManager;
+import org.apache.kylin.invertedindex.IIManager;
 import org.apache.kylin.metadata.project.ProjectManager;
 import org.springframework.stereotype.Component;
 
@@ -61,6 +63,14 @@ public class CacheService extends BasicService {
                     IIDescManager.clearCache();
                     CubeDescManager.clearCache();
                     break;
+                case ALL:
+                    getMetadataManager().reload();
+                    CubeDescManager.clearCache();
+                    CubeManager.clearCache();
+                    IIDescManager.clearCache();
+                    IIManager.clearCache();
+                    ProjectManager.clearCache();
+                    break;
                 default:
                     throw new RuntimeException("invalid cacheType:" + cacheType);
             }

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/ca08b5c4/webapp/app/js/services/cache.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/services/cache.js b/webapp/app/js/services/cache.js
index 55062d0..b8481c4 100644
--- a/webapp/app/js/services/cache.js
+++ b/webapp/app/js/services/cache.js
@@ -18,6 +18,6 @@
 
 KylinApp.factory('CacheService', ['$resource', function ($resource, config) {
     return $resource(Config.service.url + 'cache/:type/:name/:action', {}, {
-        clean: {method: 'PUT', params: {type:'cube', name:'all', action: 'update'}, isArray:
false}
+        clean: {method: 'PUT', params: {type:'all', name:'all', action: 'update'}, isArray:
false}
     });
 }]);


Mime
View raw message