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

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

本文整理了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

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

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

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

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

  1. /**
  2. * Sets create time if not already set.
  3. */
  4. private Table gettableWithCreateTime(Table table, int createTime) {
  5. if (table.isSetCreateTime() && table.getCreateTime() > 0) {
  6. return table;
  7. }
  8. Table actualtable = table.deepCopy();
  9. actualtable.setCreateTime(createTime);
  10. return actualtable;
  11. }

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

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

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

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

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

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

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

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

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

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

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

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

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

  1. @Test
  2. public void testAlterTable() throws Exception {
  3. Table originalTable = testTables[2];
  4. String originalTableName = originalTable.getTableName();
  5. String originalDatabase = originalTable.getDbName();
  6. Table newTable = getTableWithAllParametersSet();
  7. newTable.setTableName(originalTableName);
  8. newTable.setDbName(originalDatabase);
  9. // Partition keys can not be set, but getTableWithAllParametersSet is added one, so remove for
  10. // this test
  11. newTable.setPartitionKeys(originalTable.getPartitionKeys());
  12. client.alter_table(originalDatabase, originalTableName, newTable);
  13. Table alteredTable = client.getTable(originalDatabase, originalTableName);
  14. // The extra parameters will be added on server side, so check that the required ones are
  15. // present
  16. for(String key: newTable.getParameters().keySet()) {
  17. Assert.assertEquals("parameters are present", newTable.getParameters().get(key),
  18. alteredTable.getParameters().get(key));
  19. }
  20. // The parameters are checked manually, so do not check them
  21. newTable.setParameters(alteredTable.getParameters());
  22. // Some of the data is set on the server side, so reset those
  23. newTable.setCreateTime(alteredTable.getCreateTime());
  24. newTable.setCreationMetadata(alteredTable.getCreationMetadata());
  25. newTable.setWriteId(alteredTable.getWriteId());
  26. Assert.assertTrue(alteredTable.isSetId());
  27. alteredTable.unsetId();
  28. Assert.assertEquals("The table data should be the same", newTable, alteredTable);
  29. }

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

  1. table.setCreateTime(createdTable.getCreateTime());

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

  1. unsetCreateTime();
  2. } else {
  3. setCreateTime((Integer)value);

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

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

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

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

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

  1. /**
  2. * Remove (or set to 0) fields in the table object that should not be compared.
  3. *
  4. * @param table the table to remove non-comparable fields
  5. * @return the table with non-comparable fields removed
  6. */
  7. public static Table stripNonComparables(Table table) {
  8. Table newTable = new Table(table);
  9. newTable.setCreateTime(0);
  10. newTable.setLastAccessTime(0);
  11. return newTable;
  12. }

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

  1. /**
  2. * Remove (or set to 0) fields in the table object that should not be compared.
  3. *
  4. * @param table the table to remove non-comparable fields
  5. * @return the table with non-comparable fields removed
  6. */
  7. public static Table stripNonComparables(Table table) {
  8. Table newTable = new Table(table);
  9. newTable.setCreateTime(0);
  10. newTable.setLastAccessTime(0);
  11. return newTable;
  12. }

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

  1. /**
  2. * Sets create time if not already set.
  3. */
  4. private Table gettableWithCreateTime(Table table, int createTime) {
  5. if (table.isSetCreateTime() && table.getCreateTime() > 0) {
  6. return table;
  7. }
  8. Table actualtable = table.deepCopy();
  9. actualtable.setCreateTime(createTime);
  10. return actualtable;
  11. }

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

  1. /**
  2. * Sets create time if not already set.
  3. */
  4. private Table gettableWithCreateTime(Table table, int createTime) {
  5. if (table.isSetCreateTime() && table.getCreateTime() > 0) {
  6. return table;
  7. }
  8. Table actualtable = table.deepCopy();
  9. actualtable.setCreateTime(createTime);
  10. return actualtable;
  11. }

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

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

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

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

相关文章

Table类方法