org.apache.hadoop.hive.metastore.api.Table.setCreateTime()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(5.2k)|赞(0)|评价(0)|浏览(144)

本文整理了Java中org.apache.hadoop.hive.metastore.api.Table.setCreateTime()方法的一些代码示例,展示了Table.setCreateTime()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Table.setCreateTime()方法的具体详情如下:
包路径:org.apache.hadoop.hive.metastore.api.Table
类名称:Table
方法名:setCreateTime

Table.setCreateTime介绍

暂无

代码示例

代码示例来源:origin: apache/hive

public void setCreateTime(int createTime) {
 tTable.setCreateTime(createTime);
}

代码示例来源:origin: apache/drill

public void setCreateTime(int createTime) {
 tTable.setCreateTime(createTime);
}

代码示例来源:origin: apache/incubator-gobblin

/**
 * 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;
}

代码示例来源:origin: apache/incubator-gobblin

table.setParameters(getParameters(props));
if (hiveTable.getCreateTime().isPresent()) {
 table.setCreateTime(Ints.checkedCast(hiveTable.getCreateTime().get()));

代码示例来源:origin: apache/hive

t.setOwner(SessionState.getUserFromAuthenticator());
t.setCreateTime((int) (System.currentTimeMillis() / 1000));

代码示例来源:origin: apache/drill

t.setOwner(SessionState.getUserFromAuthenticator());
t.setCreateTime((int) (System.currentTimeMillis() / 1000));

代码示例来源:origin: apache/hive

newTable.setCreateTime((int) (System.currentTimeMillis() / 1000));
newTable.setLastAccessTimeIsSet(false);
try {

代码示例来源:origin: apache/hive

tbl.setCreateTime((int) time);
if (tbl.getParameters() == null ||
  tbl.getParameters().get(hive_metastoreConstants.DDL_TIME) == null) {

代码示例来源:origin: apache/hive

newTable.setCreateTime((int) (System.currentTimeMillis() / 1000));
newTable.setLastAccessTimeIsSet(false);

代码示例来源:origin: apache/hive

@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);
}

代码示例来源:origin: apache/hive

table.setCreateTime(createdTable.getCreateTime());

代码示例来源:origin: apache/hive

unsetCreateTime();
} else {
 setCreateTime((Integer)value);

代码示例来源:origin: com.facebook.presto.hive/hive-apache

public void setCreateTime(int createTime) {
 tTable.setCreateTime(createTime);
}

代码示例来源:origin: org.apache.hadoop.hive/hive-exec

public void setCreateTime(int createTime) {
 tTable.setCreateTime(createTime);
}

代码示例来源:origin: airbnb/reair

/**
 * 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;
}

代码示例来源:origin: airbnb/reair

/**
 * 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;
}

代码示例来源:origin: com.linkedin.gobblin/gobblin-hive-registration

/**
 * 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;
}

代码示例来源:origin: org.apache.gobblin/gobblin-hive-registration

/**
 * 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;
}

代码示例来源:origin: org.apache.gobblin/gobblin-hive-registration

table.setParameters(getParameters(props));
if (hiveTable.getCreateTime().isPresent()) {
 table.setCreateTime(Ints.checkedCast(hiveTable.getCreateTime().get()));

代码示例来源:origin: com.linkedin.gobblin/gobblin-hive-registration

table.setParameters(getParameters(props));
if (hiveTable.getCreateTime().isPresent()) {
 table.setCreateTime(Ints.checkedCast(hiveTable.getCreateTime().get()));

相关文章

Table类方法