You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kylin.apache.org by GitBox <gi...@apache.org> on 2018/11/07 05:46:33 UTC

[GitHub] shaofengshi closed pull request #325: KYLIN-3663 fix deleting project error when project has more than one …

shaofengshi closed pull request #325: KYLIN-3663 fix deleting project error when project has more than one …
URL: https://github.com/apache/kylin/pull/325
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/server-base/src/main/java/org/apache/kylin/rest/service/ProjectService.java b/server-base/src/main/java/org/apache/kylin/rest/service/ProjectService.java
index 831035a678..2677578b38 100644
--- a/server-base/src/main/java/org/apache/kylin/rest/service/ProjectService.java
+++ b/server-base/src/main/java/org/apache/kylin/rest/service/ProjectService.java
@@ -28,6 +28,7 @@
 
 import javax.annotation.Nullable;
 
+import com.google.common.collect.Sets;
 import org.apache.directory.api.util.Strings;
 import org.apache.kylin.metadata.project.ProjectInstance;
 import org.apache.kylin.metadata.realization.RealizationType;
@@ -137,8 +138,10 @@ public ProjectInstance updateProject(ProjectInstance newProject, ProjectInstance
     @PreAuthorize(Constant.ACCESS_HAS_ROLE_ADMIN)
     public void deleteProject(String projectName, ProjectInstance project) throws IOException {
         Set<String> tables = project.getTables();
-        for (String table : tables) {
+        for (String table : Sets.newTreeSet(tables)) {
             tableService.unloadHiveTable(table, projectName);
+            getTableManager().removeTableExt(table, projectName);
+            getTableACLManager().deleteTableACLByTbl(projectName, table);
         }
         getProjectManager().dropProject(projectName);
         accessService.clean(project, true);


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services