kylin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From liy...@apache.org
Subject [30/50] [abbrv] kylin git commit: KYLIN-2760, remove useless ACL code.
Date Sun, 04 Feb 2018 00:51:33 GMT
KYLIN-2760, remove useless ACL code.


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

Branch: refs/heads/sync
Commit: d2203f430f4f9dcf0bd681b7657f31906a32a5bc
Parents: 95e3d07
Author: tttMelody <245915794@qq.com>
Authored: Mon Jan 15 17:40:47 2018 +0800
Committer: Li Yang <liyang@apache.org>
Committed: Fri Jan 26 22:54:58 2018 +0800

----------------------------------------------------------------------
 .../apache/kylin/rest/service/AccessService.java   |  1 +
 .../org/apache/kylin/rest/service/CubeService.java | 12 ------------
 .../org/apache/kylin/rest/service/JobService.java  | 17 -----------------
 .../apache/kylin/rest/service/ModelService.java    | 13 -------------
 4 files changed, 1 insertion(+), 42 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/d2203f43/server-base/src/main/java/org/apache/kylin/rest/service/AccessService.java
----------------------------------------------------------------------
diff --git a/server-base/src/main/java/org/apache/kylin/rest/service/AccessService.java b/server-base/src/main/java/org/apache/kylin/rest/service/AccessService.java
index 3732c15..8498ecd 100644
--- a/server-base/src/main/java/org/apache/kylin/rest/service/AccessService.java
+++ b/server-base/src/main/java/org/apache/kylin/rest/service/AccessService.java
@@ -218,6 +218,7 @@ public class AccessService {
         return acl;
     }
 
+    @Deprecated
     @Transactional
     public void inherit(AclEntity ae, AclEntity parentAe) {
         Message msg = MsgPicker.getMsg();

http://git-wip-us.apache.org/repos/asf/kylin/blob/d2203f43/server-base/src/main/java/org/apache/kylin/rest/service/CubeService.java
----------------------------------------------------------------------
diff --git a/server-base/src/main/java/org/apache/kylin/rest/service/CubeService.java b/server-base/src/main/java/org/apache/kylin/rest/service/CubeService.java
index 154354d..8238f5c 100644
--- a/server-base/src/main/java/org/apache/kylin/rest/service/CubeService.java
+++ b/server-base/src/main/java/org/apache/kylin/rest/service/CubeService.java
@@ -71,7 +71,6 @@ import org.apache.kylin.rest.response.CuboidTreeResponse;
 import org.apache.kylin.rest.response.CuboidTreeResponse.NodeInfo;
 import org.apache.kylin.rest.response.HBaseResponse;
 import org.apache.kylin.rest.response.MetricsResponse;
-import org.apache.kylin.rest.security.AclPermission;
 import org.apache.kylin.rest.util.AclEvaluate;
 import org.apache.kylin.rest.util.ValidateUtil;
 import org.slf4j.Logger;
@@ -103,10 +102,6 @@ public class CubeService extends BasicService implements InitializingBean
{
     protected Cache<String, HBaseResponse> htableInfoCache = CacheBuilder.newBuilder().build();
 
     @Autowired
-    @Qualifier("accessService")
-    private AccessService accessService;
-
-    @Autowired
     @Qualifier("projectService")
     private ProjectService projectService;
 
@@ -216,10 +211,6 @@ public class CubeService extends BasicService implements InitializingBean
{
         logger.info("New cube " + cubeName + " has " + cuboidCount + " cuboids");
 
         createdCube = getCubeManager().createCube(cubeName, project.getName(), createdDesc,
owner);
-        accessService.init(createdCube, AclPermission.ADMINISTRATION);
-
-        accessService.inherit(createdCube, project);
-
         return createdCube;
     }
 
@@ -289,8 +280,6 @@ public class CubeService extends BasicService implements InitializingBean
{
             String owner = SecurityContextHolder.getContext().getAuthentication().getName();
             ProjectInstance newProject = projectManager.moveRealizationToProject(RealizationType.CUBE,
cube.getName(),
                     newProjectName, owner);
-
-            accessService.inherit(cube, newProject);
         }
 
         return updatedCubeDesc;
@@ -315,7 +304,6 @@ public class CubeService extends BasicService implements InitializingBean
{
 
         int cubeNum = getCubeManager().getCubesByDesc(cube.getDescriptor().getName()).size();
         getCubeManager().dropCube(cube.getName(), cubeNum == 1);//only delete cube desc when
no other cube is using it
-        accessService.clean(cube, true);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/kylin/blob/d2203f43/server-base/src/main/java/org/apache/kylin/rest/service/JobService.java
----------------------------------------------------------------------
diff --git a/server-base/src/main/java/org/apache/kylin/rest/service/JobService.java b/server-base/src/main/java/org/apache/kylin/rest/service/JobService.java
index bd90742..e447031 100644
--- a/server-base/src/main/java/org/apache/kylin/rest/service/JobService.java
+++ b/server-base/src/main/java/org/apache/kylin/rest/service/JobService.java
@@ -74,7 +74,6 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.InitializingBean;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Qualifier;
 import org.springframework.context.annotation.EnableAspectJAutoProxy;
 import org.springframework.security.core.context.SecurityContextHolder;
 import org.springframework.stereotype.Component;
@@ -97,10 +96,6 @@ public class JobService extends BasicService implements InitializingBean
{
     private static final Logger logger = LoggerFactory.getLogger(JobService.class);
 
     @Autowired
-    @Qualifier("accessService")
-    private AccessService accessService;
-
-    @Autowired
     private AclEvaluate aclEvaluate;
 
     /*
@@ -213,9 +208,6 @@ public class JobService extends BasicService implements InitializingBean
{
         JobInstance jobInstance = submitJobInternal(cube, tsRange, segRange, sourcePartitionOffsetStart,
                 sourcePartitionOffsetEnd, buildType, force, submitter);
 
-        accessService.init(jobInstance, null);
-        accessService.inherit(jobInstance, cube);
-
         return jobInstance;
     }
 
@@ -282,13 +274,6 @@ public class JobService extends BasicService implements InitializingBean
{
             String submitter) throws IOException, JobException {
 
         Pair<JobInstance, List<JobInstance>> result = submitOptimizeJobInternal(cube,
cuboidsRecommend, submitter);
-        accessService.init(result.getFirst(), null);
-        accessService.inherit(result.getFirst(), cube);
-        for (JobInstance jobInstance : result.getSecond()) {
-            accessService.init(jobInstance, null);
-            accessService.inherit(jobInstance, cube);
-        }
-
         return result;
     }
 
@@ -391,8 +376,6 @@ public class JobService extends BasicService implements InitializingBean
{
         getExecutableManager().addJob(optimizeJob);
 
         JobInstance optimizeJobInstance = getSingleJobInstance(optimizeJob);
-        accessService.init(optimizeJobInstance, null);
-        accessService.inherit(optimizeJobInstance, cubeInstance);
 
         /** Update the checkpoint job */
         checkpointExecutable.getSubTasksForCheck().set(checkpointExecutable.getSubTasksForCheck().indexOf(toBeReplaced),

http://git-wip-us.apache.org/repos/asf/kylin/blob/d2203f43/server-base/src/main/java/org/apache/kylin/rest/service/ModelService.java
----------------------------------------------------------------------
diff --git a/server-base/src/main/java/org/apache/kylin/rest/service/ModelService.java b/server-base/src/main/java/org/apache/kylin/rest/service/ModelService.java
index ee01f3e..463107b 100644
--- a/server-base/src/main/java/org/apache/kylin/rest/service/ModelService.java
+++ b/server-base/src/main/java/org/apache/kylin/rest/service/ModelService.java
@@ -42,7 +42,6 @@ import org.apache.kylin.rest.exception.BadRequestException;
 import org.apache.kylin.rest.exception.ForbiddenException;
 import org.apache.kylin.rest.msg.Message;
 import org.apache.kylin.rest.msg.MsgPicker;
-import org.apache.kylin.rest.security.AclPermission;
 import org.apache.kylin.rest.util.AclEvaluate;
 import org.apache.kylin.rest.util.ValidateUtil;
 import org.slf4j.Logger;
@@ -65,10 +64,6 @@ public class ModelService extends BasicService {
     private static final Logger logger = LoggerFactory.getLogger(ModelService.class);
 
     @Autowired
-    @Qualifier("accessService")
-    private AccessService accessService;
-
-    @Autowired
     @Qualifier("cubeMgmtService")
     private CubeService cubeService;
 
@@ -142,12 +137,6 @@ public class ModelService extends BasicService {
         DataModelDesc createdDesc = null;
         String owner = SecurityContextHolder.getContext().getAuthentication().getName();
         createdDesc = getDataModelManager().createDataModelDesc(desc, projectName, owner);
-
-        if (!desc.isDraft()) {
-            accessService.init(createdDesc, AclPermission.ADMINISTRATION);
-            ProjectInstance project = getProjectManager().getProject(projectName);
-            accessService.inherit(createdDesc, project);
-        }
         return createdDesc;
     }
 
@@ -169,8 +158,6 @@ public class ModelService extends BasicService {
         }
 
         getDataModelManager().dropModel(desc);
-
-        accessService.clean(desc, true);
     }
 
     public boolean isTableInAnyModel(TableDesc table) {


Mime
View raw message