You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by sh...@apache.org on 2015/11/07 04:34:55 UTC

incubator-kylin git commit: KYLIN-1127 fix a NPE

Repository: incubator-kylin
Updated Branches:
  refs/heads/2.x-staging b3fefd140 -> f9f96404f


KYLIN-1127 fix a NPE

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

Branch: refs/heads/2.x-staging
Commit: f9f96404f7ca5c631b10ac06696483fe34f7f74f
Parents: b3fefd1
Author: shaofengshi <sh...@apache.org>
Authored: Sat Nov 7 11:33:44 2015 +0800
Committer: shaofengshi <sh...@apache.org>
Committed: Sat Nov 7 11:33:44 2015 +0800

----------------------------------------------------------------------
 .../src/main/java/org/apache/kylin/rest/service/CacheService.java  | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/f9f96404/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 c1e0ed2..63fe8c4 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
@@ -125,9 +125,11 @@ public class CacheService extends BasicService {
         try {
             switch (cacheType) {
                 case CUBE:
+                if (getCubeManager().getCube(cacheKey) != null) {
                     String storageUUID = getCubeManager().getCube(cacheKey).getUuid();
                     getCubeManager().removeCubeLocal(cacheKey);
                     super.cleanDataCache(storageUUID);
+                }
                     break;
                 case CUBE_DESC:
                     getCubeDescManager().removeLocalCubeDesc(cacheKey);