[
https://issues.apache.org/jira/browse/KYLIN-4939?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17308316#comment-17308316
]
ASF GitHub Bot commented on KYLIN-4939:
---------------------------------------
hit-lacus commented on a change in pull request #1615:
URL: https://github.com/apache/kylin/pull/1615#discussion_r601007362
##########
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:
Placeholder should be `%` or `{}` ?
--
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:
[email protected]
> 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)