private void afterIIUpdated(IIInstance updatedII) { iiMap.put(updatedII.getName(), updatedII); }
private void afterCubeUpdated(CubeInstance updatedCube) { cubeMap.put(updatedCube.getName(), updatedCube); }
public void saveSourceTable(TableDesc srcTable) throws IOException { if (srcTable.getUuid() == null || srcTable.getIdentity() == null) { throw new IllegalArgumentException(); } srcTable.init(); String path = srcTable.getResourcePath(); getStore().putResource(path, srcTable, TABLE_SERIALIZER); srcTableMap.put(srcTable.getIdentity(), srcTable); }
private DataModelDesc saveDataModelDesc(DataModelDesc dataModelDesc) throws IOException { dataModelDesc.init(this.getAllTablesMap()); String path = dataModelDesc.getResourcePath(); getStore().putResource(path, dataModelDesc, MODELDESC_SERIALIZER); dataModelDescMap.put(dataModelDesc.getName(), dataModelDesc); return dataModelDesc; }
private void saveResource(ProjectInstance prj) throws IOException { ResourceStore store = getStore(); store.putResource(prj.getResourcePath(), prj, PROJECT_SERIALIZER); prj = reloadProjectAt(prj.getResourcePath()); projectMap.put(norm(prj.getName()), prj); // triggers update broadcast clearL2Cache(); }
/** * Create a new IIDesc * * @param iiDesc * @return * @throws IOException */ public IIDesc createIIDesc(IIDesc iiDesc) throws IOException { if (iiDesc.getUuid() == null || iiDesc.getName() == null) throw new IllegalArgumentException(); if (iiDescMap.containsKey(iiDesc.getName())) throw new IllegalArgumentException("IIDesc '" + iiDesc.getName() + "' already exists"); iiDesc.init(getMetadataManager()); // Check base validation // Semantic validation // TODO iiDesc.setSignature(iiDesc.calculateSignature()); String path = iiDesc.getResourcePath(); getStore().putResource(path, iiDesc, II_DESC_SERIALIZER); iiDescMap.put(iiDesc.getName(), iiDesc); return iiDesc; }
/** * Update IIDesc with the input. Broadcast the event into cluster * * @param desc * @return * @throws IOException */ public IIDesc updateIIDesc(IIDesc desc) throws IOException { // Validate IIDesc if (desc.getUuid() == null || desc.getName() == null) { throw new IllegalArgumentException(); } String name = desc.getName(); if (!iiDescMap.containsKey(name)) { throw new IllegalArgumentException("IIDesc '" + name + "' does not exist."); } desc.init(getMetadataManager()); // TODO: Semantic validation desc.setSignature(desc.calculateSignature()); // Save Source String path = desc.getResourcePath(); getStore().putResource(path, desc, II_DESC_SERIALIZER); // Reload the IIDesc IIDesc ndesc = loadIIDesc(path); // Here replace the old one iiDescMap.put(ndesc.getName(), desc); return ndesc; }
cubeDescMap.put(cubeDesc.getName(), cubeDesc);
cubeDescMap.put(ndesc.getName(), desc);
private void afterCubeUpdated(CubeInstance updatedCube) { cubeMap.put(updatedCube.getName(), updatedCube); }
public StreamingConfig saveStreamingConfig(StreamingConfig streamingConfig) throws IOException { if (streamingConfig == null || StringUtils.isEmpty(streamingConfig.getName())) { throw new IllegalArgumentException(); } if (streamingMap.containsKey(streamingConfig.getName())) throw new IllegalArgumentException("StreamingConfig '" + streamingConfig.getName() + "' already exists"); String path = StreamingConfig.concatResourcePath(streamingConfig.getName()); getStore().putResource(path, streamingConfig, StreamingConfig.SERIALIZER); streamingMap.put(streamingConfig.getName(), streamingConfig); return streamingConfig; }
public void saveSourceTable(TableDesc srcTable) throws IOException { if (srcTable.getUuid() == null || srcTable.getIdentity() == null) { throw new IllegalArgumentException(); } srcTable.init(); String path = srcTable.getResourcePath(); getStore().putResource(path, srcTable, TABLE_SERIALIZER); srcTableMap.put(srcTable.getIdentity(), srcTable); }
public void updateII(IIInstance ii) throws IOException { logger.info("Updating II instance : " + ii.getName()); getStore().putResource(ii.getResourcePath(), ii, II_SERIALIZER); iiMap.put(ii.getName(), ii); //this is a duplicate call to take care of scenarios where REST cache service unavailable ProjectManager.getInstance(KylinConfig.getInstanceFromEnv()).clearL2Cache(); }
private DataModelDesc saveDataModelDesc(DataModelDesc dataModelDesc) throws IOException { dataModelDesc.init(this.getAllTablesMap()); String path = dataModelDesc.getResourcePath(); getStore().putResource(path, dataModelDesc, MODELDESC_SERIALIZER); dataModelDescMap.put(dataModelDesc.getName(), dataModelDesc); return dataModelDesc; }
/** * Update CubeDesc with the input. Broadcast the event into cluster * * @param desc * @return * @throws IOException */ public StreamingConfig updateStreamingConfig(StreamingConfig desc) throws IOException { // Validate CubeDesc if (desc.getUuid() == null || desc.getName() == null) { throw new IllegalArgumentException("SteamingConfig Illegal."); } String name = desc.getName(); if (!streamingMap.containsKey(name)) { throw new IllegalArgumentException("StreamingConfig '" + name + "' does not exist."); } // Save Source String path = desc.getResourcePath(); getStore().putResource(path, desc, STREAMING_SERIALIZER); // Reload the StreamingConfig StreamingConfig ndesc = loadStreamingConfigAt(path); // Here replace the old one streamingMap.put(ndesc.getName(), desc); return ndesc; }
private void saveResource(ProjectInstance prj) throws IOException { ResourceStore store = getStore(); store.putResource(prj.getResourcePath(), prj, PROJECT_SERIALIZER); prj = reloadProjectAt(prj.getResourcePath()); projectMap.put(norm(prj.getName()), prj); // triggers update broadcast clearL2Cache(); }
/** * Create a new IIDesc * * @param iiDesc * @return * @throws IOException */ public IIDesc createIIDesc(IIDesc iiDesc) throws IOException { if (iiDesc.getUuid() == null || iiDesc.getName() == null) throw new IllegalArgumentException(); if (iiDescMap.containsKey(iiDesc.getName())) throw new IllegalArgumentException("IIDesc '" + iiDesc.getName() + "' already exists"); iiDesc.init(getMetadataManager()); // Check base validation // Semantic validation // TODO iiDesc.setSignature(iiDesc.calculateSignature()); String path = iiDesc.getResourcePath(); getStore().putResource(path, iiDesc, II_DESC_SERIALIZER); iiDescMap.put(iiDesc.getName(), iiDesc); return iiDesc; }
/** * Update IIDesc with the input. Broadcast the event into cluster * * @param desc * @return * @throws IOException */ public IIDesc updateIIDesc(IIDesc desc) throws IOException { // Validate IIDesc if (desc.getUuid() == null || desc.getName() == null) { throw new IllegalArgumentException(); } String name = desc.getName(); if (!iiDescMap.containsKey(name)) { throw new IllegalArgumentException("IIDesc '" + name + "' does not exist."); } desc.init(getMetadataManager()); // TODO: Semantic validation desc.setSignature(desc.calculateSignature()); // Save Source String path = desc.getResourcePath(); getStore().putResource(path, desc, II_DESC_SERIALIZER); // Reload the IIDesc IIDesc ndesc = loadIIDesc(path); // Here replace the old one iiDescMap.put(ndesc.getName(), desc); return ndesc; }
cubeDescMap.put(cubeDesc.getName(), cubeDesc);
cubeDescMap.put(ndesc.getName(), desc);