public Set<String> getPartCols() { Set<String> partCols = Sets.newHashSet(); String partColsStr = getProperties().get(MetastoreUtil.getDimTablePartsKey(getName())); if (partColsStr != null) { for (String s : StringUtils.split(partColsStr, ",")) { if (!StringUtils.isBlank(s)) { partCols.add(s); } } } return partCols; }
public Set<String> getPartCols() { Set<String> partCols = Sets.newHashSet(); String partColsStr = getProperties().get(MetastoreUtil.getDimTablePartsKey(getName())); if (partColsStr != null) { for (String s : StringUtils.split(partColsStr, ",")) { if (!StringUtils.isBlank(s)) { partCols.add(s); } } } return partCols; }
/** * Alter snapshot dump period of a storage * * @param storage Storage name * @param period The new value */ public void alterSnapshotDumpPeriod(@NonNull String storage, UpdatePeriod period) { if (snapshotDumpPeriods.containsKey(storage)) { log.info("Updating dump period for {} from {} to {}", storage, snapshotDumpPeriods.get(storage), period); } snapshotDumpPeriods.put(storage, period); setSnapshotDumpPeriods(getName(), getProperties(), snapshotDumpPeriods); }
/** * Alter snapshot dump period of a storage * * @param storage Storage name * @param period The new value */ public void alterSnapshotDumpPeriod(@NonNull String storage, UpdatePeriod period) { if (snapshotDumpPeriods.containsKey(storage)) { log.info("Updating dump period for {} from {} to {}", storage, snapshotDumpPeriods.get(storage), period); } snapshotDumpPeriods.put(storage, period); setSnapshotDumpPeriods(getName(), getProperties(), snapshotDumpPeriods); }
void dropStorage(String storage) { snapshotDumpPeriods.remove(storage); setSnapshotDumpPeriods(getName(), getProperties(), snapshotDumpPeriods); } }
public CubeDimensionTable(Table tbl) { super(tbl); this.dimName = getDimName(getName(), getProperties()); Map<String, UpdatePeriod> dumpPeriods = getDumpPeriods(getName(), getProperties()); if (dumpPeriods != null) { this.snapshotDumpPeriods.putAll(dumpPeriods); } }
void dropStorage(String storage) { snapshotDumpPeriods.remove(storage); setSnapshotDumpPeriods(getName(), getProperties(), snapshotDumpPeriods); } }
public CubeDimensionTable(Table tbl) { super(tbl); this.dimName = getDimName(getName(), getProperties()); Map<String, UpdatePeriod> dumpPeriods = getDumpPeriods(getName(), getProperties()); if (dumpPeriods != null) { this.snapshotDumpPeriods.putAll(dumpPeriods); } }
/** * Alter the dimension name that the table belongs to * * @param newDimName new dimension name. */ public void alterUberDim(String newDimName) { this.dimName = newDimName; setDimName(getName(), getProperties(), this.dimName); }
/** * Alter the dimension name that the table belongs to * * @param newDimName new dimension name. */ public void alterUberDim(String newDimName) { this.dimName = newDimName; setDimName(getName(), getProperties(), this.dimName); }
@Override protected void addProperties() { super.addProperties(); setDimName(getName(), getProperties(), dimName); setSnapshotDumpPeriods(getName(), getProperties(), snapshotDumpPeriods); }
@Override protected void addProperties() { super.addProperties(); setDimName(getName(), getProperties(), dimName); setSnapshotDumpPeriods(getName(), getProperties(), snapshotDumpPeriods); }
public static XDimensionTable dimTableFromCubeDimTable(CubeDimensionTable cubeDimTable) { if (cubeDimTable == null) { return null; } XDimensionTable dimTab = XCF.createXDimensionTable(); dimTab.setDimensionName(cubeDimTable.getDimName()); dimTab.setTableName(cubeDimTable.getName()); dimTab.setWeight(cubeDimTable.weight()); dimTab.setColumns(new XColumns()); dimTab.setProperties(new XProperties()); dimTab.setStorageTables(new XStorageTables()); for (FieldSchema column : cubeDimTable.getColumns()) { dimTab.getColumns().getColumn().add(columnFromFieldSchema(column)); } dimTab.getProperties().getProperty().addAll(xPropertiesFromMap(cubeDimTable.getProperties())); return dimTab; }
public static XDimensionTable dimTableFromCubeDimTable(CubeDimensionTable cubeDimTable) { if (cubeDimTable == null) { return null; } XDimensionTable dimTab = XCF.createXDimensionTable(); dimTab.setDimensionName(cubeDimTable.getDimName()); dimTab.setTableName(cubeDimTable.getName()); dimTab.setWeight(cubeDimTable.weight()); dimTab.setColumns(new XColumns()); dimTab.setProperties(new XProperties()); dimTab.setStorageTables(new XStorageTables()); for (FieldSchema column : cubeDimTable.getColumns()) { dimTab.getColumns().getColumn().add(columnFromFieldSchema(column)); } dimTab.getProperties().getProperty().addAll(xPropertiesFromMap(cubeDimTable.getProperties())); return dimTab; }