You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by bi...@apache.org on 2017/11/07 13:47:13 UTC
kylin git commit: KYLIN-2967 Add the dependency check when deleting a
project
Repository: kylin
Updated Branches:
refs/heads/master c987b30fa -> 3f3c42b3b
KYLIN-2967 Add the dependency check when deleting a project
Signed-off-by: Billy Liu <bi...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/3f3c42b3
Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/3f3c42b3
Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/3f3c42b3
Branch: refs/heads/master
Commit: 3f3c42b3b6fbf393f63676eb439219007707aeff
Parents: c987b30
Author: peng.jianhua <pe...@zte.com.cn>
Authored: Tue Nov 7 17:21:56 2017 +0800
Committer: Billy Liu <bi...@apache.org>
Committed: Tue Nov 7 21:47:02 2017 +0800
----------------------------------------------------------------------
.../java/org/apache/kylin/metadata/project/ProjectManager.java | 5 +++++
1 file changed, 5 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/kylin/blob/3f3c42b3/core-metadata/src/main/java/org/apache/kylin/metadata/project/ProjectManager.java
----------------------------------------------------------------------
diff --git a/core-metadata/src/main/java/org/apache/kylin/metadata/project/ProjectManager.java b/core-metadata/src/main/java/org/apache/kylin/metadata/project/ProjectManager.java
index 8044797..b4431b4 100644
--- a/core-metadata/src/main/java/org/apache/kylin/metadata/project/ProjectManager.java
+++ b/core-metadata/src/main/java/org/apache/kylin/metadata/project/ProjectManager.java
@@ -207,6 +207,11 @@ public class ProjectManager {
throw new IllegalStateException("The project named " + projectName + " does not exist");
}
+ if (projectInstance.getModels().size() != 0) {
+ throw new IllegalStateException("The project named " + projectName
+ + " can not be deleted because there's still model in it. Delete them first.");
+ }
+
if (projectInstance.getRealizationCount(null) != 0) {
throw new IllegalStateException("The project named " + projectName
+ " can not be deleted because there's still realizations in it. Delete them first.");