[ 
https://issues.apache.org/jira/browse/KYLIN-4939?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17310381#comment-17310381
 ] 

ASF GitHub Bot commented on KYLIN-4939:
---------------------------------------

Ted-Jiang commented on a change in pull request #1615:
URL: https://github.com/apache/kylin/pull/1615#discussion_r603002314



##########
File path: 
server-base/src/main/java/org/apache/kylin/rest/controller/CubeController.java
##########
@@ -346,6 +346,35 @@ public JobInstance rebuildLookupSnapshot(@PathVariable 
String cubeName,
         }
     }
 
+    /**
+     * Force change a cube's lookup table to be global
+     *
+     *@throws IOException
+     */
+    @RequestMapping(value = "/{cubeNames}/{tableName}/change_lookup_global", 
method = {
+            RequestMethod.PUT }, produces = { "application/json" })
+    @ResponseBody
+    public List<CubeInstance> globalLookupSnapshot(@PathVariable String 
cubeNames, @PathVariable String tableName) {
+
+        List<CubeInstance> result = new ArrayList<>();
+
+        final CubeManager cubeMgr = cubeService.getCubeManager();
+        String[] changeCubes = cubeNames.toUpperCase(Locale.ROOT).split(",");
+        for (String cubeName : changeCubes) {
+            try {
+                checkCubeExists(cubeName);
+                final CubeInstance cube = cubeMgr.getCube(cubeName);
+                CubeInstance cubeInstance = 
cubeService.changeLookupSnapshotBeGlobal(cube, tableName);
+                logger.info("cube %s change snapshotTable %s global Success", 
cubeName, tableName);

Review comment:
       fix




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Transform lookup table snapshot from segment level to cube level
> ----------------------------------------------------------------
>
>                 Key: KYLIN-4939
>                 URL: https://issues.apache.org/jira/browse/KYLIN-4939
>             Project: Kylin
>          Issue Type: New Feature
>    Affects Versions: v3.1.2
>            Reporter: JiangYang
>            Assignee: JiangYang
>            Priority: Major
>             Fix For: v3.1.2
>
>




--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to