public void setCreateTime(int createTime) { tTable.setCreateTime(createTime); }
public void setCreateTime(int createTime) { tTable.setCreateTime(createTime); }
/** * Sets create time if not already set. */ private Table gettableWithCreateTime(Table table, int createTime) { if (table.isSetCreateTime() && table.getCreateTime() > 0) { return table; } Table actualtable = table.deepCopy(); actualtable.setCreateTime(createTime); return actualtable; }
table.setParameters(getParameters(props)); if (hiveTable.getCreateTime().isPresent()) { table.setCreateTime(Ints.checkedCast(hiveTable.getCreateTime().get()));
t.setOwner(SessionState.getUserFromAuthenticator()); t.setCreateTime((int) (System.currentTimeMillis() / 1000));
t.setOwner(SessionState.getUserFromAuthenticator()); t.setCreateTime((int) (System.currentTimeMillis() / 1000));
newTable.setCreateTime((int) (System.currentTimeMillis() / 1000)); newTable.setLastAccessTimeIsSet(false); try {
tbl.setCreateTime((int) time); if (tbl.getParameters() == null || tbl.getParameters().get(hive_metastoreConstants.DDL_TIME) == null) {
newTable.setCreateTime((int) (System.currentTimeMillis() / 1000)); newTable.setLastAccessTimeIsSet(false);
@Test public void testAlterTable() throws Exception { Table originalTable = testTables[2]; String originalTableName = originalTable.getTableName(); String originalDatabase = originalTable.getDbName(); Table newTable = getTableWithAllParametersSet(); newTable.setTableName(originalTableName); newTable.setDbName(originalDatabase); // Partition keys can not be set, but getTableWithAllParametersSet is added one, so remove for // this test newTable.setPartitionKeys(originalTable.getPartitionKeys()); client.alter_table(originalDatabase, originalTableName, newTable); Table alteredTable = client.getTable(originalDatabase, originalTableName); // The extra parameters will be added on server side, so check that the required ones are // present for(String key: newTable.getParameters().keySet()) { Assert.assertEquals("parameters are present", newTable.getParameters().get(key), alteredTable.getParameters().get(key)); } // The parameters are checked manually, so do not check them newTable.setParameters(alteredTable.getParameters()); // Some of the data is set on the server side, so reset those newTable.setCreateTime(alteredTable.getCreateTime()); newTable.setCreationMetadata(alteredTable.getCreationMetadata()); newTable.setWriteId(alteredTable.getWriteId()); Assert.assertTrue(alteredTable.isSetId()); alteredTable.unsetId(); Assert.assertEquals("The table data should be the same", newTable, alteredTable); }
table.setCreateTime(createdTable.getCreateTime());
unsetCreateTime(); } else { setCreateTime((Integer)value);
public void setCreateTime(int createTime) { tTable.setCreateTime(createTime); }
public void setCreateTime(int createTime) { tTable.setCreateTime(createTime); }
/** * Remove (or set to 0) fields in the table object that should not be compared. * * @param table the table to remove non-comparable fields * @return the table with non-comparable fields removed */ public static Table stripNonComparables(Table table) { Table newTable = new Table(table); newTable.setCreateTime(0); newTable.setLastAccessTime(0); return newTable; }
/** * Remove (or set to 0) fields in the table object that should not be compared. * * @param table the table to remove non-comparable fields * @return the table with non-comparable fields removed */ public static Table stripNonComparables(Table table) { Table newTable = new Table(table); newTable.setCreateTime(0); newTable.setLastAccessTime(0); return newTable; }
/** * Sets create time if not already set. */ private Table gettableWithCreateTime(Table table, int createTime) { if (table.isSetCreateTime() && table.getCreateTime() > 0) { return table; } Table actualtable = table.deepCopy(); actualtable.setCreateTime(createTime); return actualtable; }
/** * Sets create time if not already set. */ private Table gettableWithCreateTime(Table table, int createTime) { if (table.isSetCreateTime() && table.getCreateTime() > 0) { return table; } Table actualtable = table.deepCopy(); actualtable.setCreateTime(createTime); return actualtable; }
table.setParameters(getParameters(props)); if (hiveTable.getCreateTime().isPresent()) { table.setCreateTime(Ints.checkedCast(hiveTable.getCreateTime().get()));
table.setParameters(getParameters(props)); if (hiveTable.getCreateTime().isPresent()) { table.setCreateTime(Ints.checkedCast(hiveTable.getCreateTime().get()));