Java Code Examples for org.apache.kylin.cube.cuboid.Cuboid#clearCache()
The following examples show how to use
org.apache.kylin.cube.cuboid.Cuboid#clearCache() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CubeManager.java From kylin-on-parquet-v2 with Apache License 2.0 | 6 votes |
public CubeInstance dropCube(String cubeName, boolean deleteDesc) throws IOException { try (AutoLock lock = cubeMapLock.lockForWrite()) { logger.info("Dropping cube '{}'", cubeName); // load projects before remove cube from project // delete cube instance and cube desc CubeInstance cube = getCube(cubeName); // remove cube and update cache crud.delete(cube); Cuboid.clearCache(cube); if (deleteDesc && cube.getDescriptor() != null) { CubeDescManager.getInstance(config).removeCubeDesc(cube.getDescriptor()); } // delete cube from project ProjectManager.getInstance(config).removeRealizationsFromProjects(RealizationType.CUBE, cubeName); return cube; } }
Example 2
Source File: CubeManager.java From kylin with Apache License 2.0 | 6 votes |
public CubeInstance dropCube(String cubeName, boolean deleteDesc) throws IOException { try (AutoLock lock = cubeMapLock.lockForWrite()) { logger.info("Dropping cube '{}'", cubeName); // load projects before remove cube from project // delete cube instance and cube desc CubeInstance cube = getCube(cubeName); // remove cube and update cache crud.delete(cube); Cuboid.clearCache(cube); if (deleteDesc && cube.getDescriptor() != null) { CubeDescManager.getInstance(config).removeCubeDesc(cube.getDescriptor()); } // delete cube from project ProjectManager.getInstance(config).removeRealizationsFromProjects(RealizationType.CUBE, cubeName); return cube; } }
Example 3
Source File: CubeManager.java From kylin-on-parquet-v2 with Apache License 2.0 | 5 votes |
public CubeInstance reloadCubeQuietly(String cubeName) { try (AutoLock lock = cubeMapLock.lockForWrite()) { CubeInstance cube = crud.reloadQuietly(cubeName); if (cube != null) Cuboid.clearCache(cube); return cube; } }
Example 4
Source File: CubeManager.java From kylin-on-parquet-v2 with Apache License 2.0 | 5 votes |
public void removeCubeLocal(String cubeName) { try (AutoLock lock = cubeMapLock.lockForWrite()) { CubeInstance cube = cubeMap.get(cubeName); if (cube != null) { cubeMap.removeLocal(cubeName); for (CubeSegment segment : cube.getSegments()) { usedStorageLocation.remove(segment.getUuid()); } Cuboid.clearCache(cube); } } }
Example 5
Source File: CubeManager.java From kylin with Apache License 2.0 | 5 votes |
public CubeInstance reloadCubeQuietly(String cubeName) { try (AutoLock lock = cubeMapLock.lockForWrite()) { CubeInstance cube = crud.reloadQuietly(cubeName); if (cube != null) Cuboid.clearCache(cube); return cube; } }
Example 6
Source File: CubeManager.java From kylin with Apache License 2.0 | 5 votes |
public void removeCubeLocal(String cubeName) { try (AutoLock lock = cubeMapLock.lockForWrite()) { CubeInstance cube = cubeMap.get(cubeName); if (cube != null) { cubeMap.removeLocal(cubeName); for (CubeSegment segment : cube.getSegments()) { usedStorageLocation.remove(segment.getUuid()); } Cuboid.clearCache(cube); } } }