public static StorageTableDesc storageTableDescFromXStorageTableElement( XStorageTableElement storageTableElement) { return storageTableDescFromXStorageTableDesc(storageTableElement.getTableDesc()); }
public static StorageTableDesc storageTableDescFromXStorageTableElement( XStorageTableElement storageTableElement) { return storageTableDescFromXStorageTableDesc(storageTableElement.getTableDesc()); }
public static Map<String, Set<String>> getStorageTablePartitionColumnsFromTableDescs(XStorageTables storageTables) { Map<String, Set<String>> storageTablePartitionColumns = new HashMap<>(); if (storageTables != null && !storageTables.getStorageTable().isEmpty()) { for (XStorageTableElement xStorageTableElement : storageTables.getStorageTable()) { Set<String> partitionColumns = new HashSet<>(); if (xStorageTableElement.getTableDesc() != null && xStorageTableElement.getTableDesc().getPartCols() != null) { for (XColumn xColumn : xStorageTableElement.getTableDesc().getPartCols().getColumn()) { partitionColumns.add(xColumn.getName()); } } storageTablePartitionColumns.put(xStorageTableElement.getStorageName(), partitionColumns); } } return storageTablePartitionColumns; }
public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) { { XUpdatePeriods theUpdatePeriods; theUpdatePeriods = this.getUpdatePeriods(); strategy.appendField(locator, this, "updatePeriods", buffer, theUpdatePeriods); } { String theStorageName; theStorageName = this.getStorageName(); strategy.appendField(locator, this, "storageName", buffer, theStorageName); } { XStorageTableDesc theTableDesc; theTableDesc = this.getTableDesc(); strategy.appendField(locator, this, "tableDesc", buffer, theTableDesc); } return buffer; }
public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) { { XUpdatePeriods theUpdatePeriods; theUpdatePeriods = this.getUpdatePeriods(); strategy.appendField(locator, this, "updatePeriods", buffer, theUpdatePeriods); } { String theStorageName; theStorageName = this.getStorageName(); strategy.appendField(locator, this, "storageName", buffer, theStorageName); } { XStorageTableDesc theTableDesc; theTableDesc = this.getTableDesc(); strategy.appendField(locator, this, "tableDesc", buffer, theTableDesc); } return buffer; }
@Override public void addDimTableStorage(LensSessionHandle sessionid, String dimTblName, XStorageTableElement storageTable) throws LensException { try (SessionContext ignored = new SessionContext(sessionid)){ CubeMetastoreClient msClient = getClient(sessionid); CubeDimensionTable dimTable = msClient.getDimensionTable(dimTblName); UpdatePeriod period = null; if (storageTable.getUpdatePeriods() != null && !storageTable.getUpdatePeriods().getUpdatePeriod().isEmpty()) { period = UpdatePeriod.valueOf(storageTable.getUpdatePeriods().getUpdatePeriod().get(0).name()); } msClient.addStorage(dimTable, storageTable.getStorageName(), period, JAXBUtils.storageTableDescFromXStorageTableDesc(storageTable.getTableDesc())); log.info("Added storage " + storageTable.getStorageName() + " for dimension table " + dimTblName + " with update period " + period); } }
public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) { int currentHashCode = 1; { XUpdatePeriods theUpdatePeriods; theUpdatePeriods = this.getUpdatePeriods(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "updatePeriods", theUpdatePeriods), currentHashCode, theUpdatePeriods); } { String theStorageName; theStorageName = this.getStorageName(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "storageName", theStorageName), currentHashCode, theStorageName); } { XStorageTableDesc theTableDesc; theTableDesc = this.getTableDesc(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "tableDesc", theTableDesc), currentHashCode, theTableDesc); } return currentHashCode; }
public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) { int currentHashCode = 1; { XUpdatePeriods theUpdatePeriods; theUpdatePeriods = this.getUpdatePeriods(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "updatePeriods", theUpdatePeriods), currentHashCode, theUpdatePeriods); } { String theStorageName; theStorageName = this.getStorageName(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "storageName", theStorageName), currentHashCode, theStorageName); } { XStorageTableDesc theTableDesc; theTableDesc = this.getTableDesc(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "tableDesc", theTableDesc), currentHashCode, theTableDesc); } return currentHashCode; }
lhsTableDesc = this.getTableDesc(); XStorageTableDesc rhsTableDesc; rhsTableDesc = that.getTableDesc(); if (!strategy.equals(LocatorUtils.property(thisLocator, "tableDesc", lhsTableDesc), LocatorUtils.property(thatLocator, "tableDesc", rhsTableDesc), lhsTableDesc, rhsTableDesc)) { return false;
lhsTableDesc = this.getTableDesc(); XStorageTableDesc rhsTableDesc; rhsTableDesc = that.getTableDesc(); if (!strategy.equals(LocatorUtils.property(thisLocator, "tableDesc", lhsTableDesc), LocatorUtils.property(thatLocator, "tableDesc", rhsTableDesc), lhsTableDesc, rhsTableDesc)) { return false;
s1Tbl.getTableDesc().setFieldDelimiter("#"); update.getStorageTables().getStorageTable().add(s1Tbl); update.getStorageTables().getStorageTable().add(createStorageTblElement("S2", table, "MONTHLY"));
dt3.getStorageTables().getStorageTable().get(0).getTableDesc().setFieldDelimiter(":"); dt3.getStorageTables().getStorageTable().get(0).getTableDesc().setInputFormat( SequenceFileInputFormat.class.getCanonicalName()); XStorageTableElement newStorage = createStorageTblElement("testAlterDimStorage", dt3.getTableName(), (String[]) null); newStorage.getTableDesc().setFieldDelimiter(":"); dt3.getStorageTables().getStorageTable().add(newStorage);