/** * Adds storage to dimension and creates corresponding storage table * * @param dim The CubeDimensionTable * @param storage The storage * @param dumpPeriod The dumpPeriod if any, null otherwise * @param storageTableDesc The storage table description * @throws LensException */ public void addStorage(CubeDimensionTable dim, String storage, UpdatePeriod dumpPeriod, StorageTableDesc storageTableDesc) throws LensException { dim.alterSnapshotDumpPeriod(storage, dumpPeriod); createOrAlterStorageHiveTable(getTableWithTypeFailFast(dim.getName(), CubeTableType.DIM_TABLE), storage, storageTableDesc); alterCubeTable(dim.getName(), getTableWithTypeFailFast(dim.getName(), CubeTableType.DIM_TABLE), dim); updateDimCache(dim.getName()); }
/** * Adds storage to dimension and creates corresponding storage table * * @param dim The CubeDimensionTable * @param storage The storage * @param dumpPeriod The dumpPeriod if any, null otherwise * @param storageTableDesc The storage table description * @throws LensException */ public void addStorage(CubeDimensionTable dim, String storage, UpdatePeriod dumpPeriod, StorageTableDesc storageTableDesc) throws LensException { checkIfAuthorized(); dim.alterSnapshotDumpPeriod(storage, dumpPeriod); createOrAlterStorageHiveTable(getTableWithTypeFailFast(dim.getName(), CubeTableType.DIM_TABLE), storage, storageTableDesc); alterCubeTable(dim.getName(), getTableWithTypeFailFast(dim.getName(), CubeTableType.DIM_TABLE), dim); updateDimCache(dim.getName()); }
storageTables.put(c1, s1); storageTables.put(c4, s1); dimTable.alterSnapshotDumpPeriod(c4, null); client.alterCubeDimensionTable(dimTblName, dimTable, storageTables); CubeDimensionTable altered2 = client.getDimensionTable(dimTblName);