You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by li...@apache.org on 2016/12/20 11:27:29 UTC

[04/50] [abbrv] kylin git commit: KYLIN-2271 minor update

KYLIN-2271 minor update


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

Branch: refs/heads/master-cdh5.7
Commit: 4408579d4b3e9f33364d738b569e5f81d6fcb5c9
Parents: 8265c3b
Author: shaofengshi <sh...@apache.org>
Authored: Mon Dec 12 11:37:25 2016 +0800
Committer: shaofengshi <sh...@apache.org>
Committed: Mon Dec 12 11:37:25 2016 +0800

----------------------------------------------------------------------
 .../java/org/apache/kylin/rest/controller/CubeController.java    | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/4408579d/server-base/src/main/java/org/apache/kylin/rest/controller/CubeController.java
----------------------------------------------------------------------
diff --git a/server-base/src/main/java/org/apache/kylin/rest/controller/CubeController.java b/server-base/src/main/java/org/apache/kylin/rest/controller/CubeController.java
index 4cf38e9..6e3668b 100644
--- a/server-base/src/main/java/org/apache/kylin/rest/controller/CubeController.java
+++ b/server-base/src/main/java/org/apache/kylin/rest/controller/CubeController.java
@@ -324,12 +324,12 @@ public class CubeController extends BasicController {
             CubeInstance cube = cubeService.getCubeManager().getCube(cubeName);
 
             if (cube == null) {
-                throw new IllegalArgumentException("Cannot find cube '" + cubeName + "'");
+                throw new InternalErrorException("Cannot find cube '" + cubeName + "'");
             }
 
             if (cube.getSegments() != null && cube.getBuildingSegments().size() > 0) {
                 int num = cube.getBuildingSegments().size();
-                throw new IllegalStateException("Cannot purge cube '" + cubeName + "' as there is " + num + " building " + (num > 1 ? "segment(s)." : "segment."));
+                throw new InternalErrorException("Cannot purge cube '" + cubeName + "' as there is " + num + " building " + (num > 1 ? "segment(s)." : "segment. Discard the related job first."));
             }
 
             return cubeService.purgeCube(cube);