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: us...@infra.apache.org