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

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

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

Table.isSetCreateTime介绍

[英]Returns true if field createTime is set (has been assigned a value) and false otherwise
[中]如果设置了字段createTime(已指定值),则返回true,否则返回false

代码示例

代码示例来源: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/hive

lastComparison = Boolean.valueOf(isSetCreateTime()).compareTo(other.isSetCreateTime());
if (lastComparison != 0) {
 return lastComparison;
if (isSetCreateTime()) {
 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createTime, other.createTime);
 if (lastComparison != 0) {

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

private static State getTableProps(Table table) {
 State tableProps = new State();
 for (Map.Entry<String, String> entry : table.getParameters().entrySet()) {
  tableProps.setProp(entry.getKey(), entry.getValue());
 }
 if (table.isSetCreateTime()) {
  tableProps.setProp(HiveConstants.CREATE_TIME, table.getCreateTime());
 }
 if (table.isSetLastAccessTime()) {
  tableProps.setProp(HiveConstants.LAST_ACCESS_TIME, table.getCreateTime());
 }
 if (table.isSetOwner()) {
  tableProps.setProp(HiveConstants.OWNER, table.getOwner());
 }
 if (table.isSetTableType()) {
  tableProps.setProp(HiveConstants.TABLE_TYPE, table.getTableType());
 }
 if (table.isSetRetention()) {
  tableProps.setProp(HiveConstants.RETENTION, table.getRetention());
 }
 return tableProps;
}

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

optionals.set(3);
if (struct.isSetCreateTime()) {
 optionals.set(4);
 oprot.writeString(struct.owner);
if (struct.isSetCreateTime()) {
 oprot.writeI32(struct.createTime);

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

return isSetOwner();
case CREATE_TIME:
 return isSetCreateTime();
case LAST_ACCESS_TIME:
 return isSetLastAccessTime();

代码示例来源: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: com.netflix.metacat/metacat-converters

@Override
public TableDto hiveToMetacatTable(final QualifiedName name, final Table table) {
  final TableDto dto = new TableDto();
  dto.setSerde(toStorageDto(table.getSd(), table.getOwner()));
  dto.setAudit(new AuditDto());
  dto.setName(name);
  if (table.isSetCreateTime()) {
    dto.getAudit().setCreatedDate(epochSecondsToDate(table.getCreateTime()));
  }
  dto.setMetadata(table.getParameters());
  final List<FieldSchema> nonPartitionColumns = table.getSd().getCols();
  final List<FieldSchema> partitionColumns = table.getPartitionKeys();
  final List<FieldDto> allFields =
    Lists.newArrayListWithCapacity(nonPartitionColumns.size() + partitionColumns.size());
  nonPartitionColumns.stream()
    .map(field -> this.hiveToMetacatField(field, false))
    .forEachOrdered(allFields::add);
  partitionColumns.stream()
    .map(field -> this.hiveToMetacatField(field, true))
    .forEachOrdered(allFields::add);
  dto.setFields(allFields);
  return dto;
}

代码示例来源:origin: Netflix/metacat

/**
 * {@inheritDoc}
 */
@Override
public TableDto hiveToMetacatTable(final QualifiedName name, final Table table) {
  final TableDto dto = new TableDto();
  dto.setSerde(toStorageDto(table.getSd(), table.getOwner()));
  dto.setAudit(new AuditDto());
  dto.setName(name);
  if (table.isSetCreateTime()) {
    dto.getAudit().setCreatedDate(epochSecondsToDate(table.getCreateTime()));
  }
  dto.setMetadata(table.getParameters());
  final List<FieldSchema> nonPartitionColumns = table.getSd().getCols();
  final List<FieldSchema> partitionColumns = table.getPartitionKeys();
  final List<FieldDto> allFields =
    Lists.newArrayListWithCapacity(nonPartitionColumns.size() + partitionColumns.size());
  nonPartitionColumns.stream()
    .map(field -> this.hiveToMetacatField(field, false))
    .forEachOrdered(allFields::add);
  partitionColumns.stream()
    .map(field -> this.hiveToMetacatField(field, true))
    .forEachOrdered(allFields::add);
  dto.setFields(allFields);
  dto.setView(new ViewDto(table.getViewOriginalText(),
    table.getViewExpandedText()));
  return dto;
}

代码示例来源:origin: com.netflix.metacat/metacat-thrift

/**
 * {@inheritDoc}
 */
@Override
public TableDto hiveToMetacatTable(final QualifiedName name, final Table table) {
  final TableDto dto = new TableDto();
  dto.setSerde(toStorageDto(table.getSd(), table.getOwner()));
  dto.setAudit(new AuditDto());
  dto.setName(name);
  if (table.isSetCreateTime()) {
    dto.getAudit().setCreatedDate(epochSecondsToDate(table.getCreateTime()));
  }
  dto.setMetadata(table.getParameters());
  final List<FieldSchema> nonPartitionColumns = table.getSd().getCols();
  final List<FieldSchema> partitionColumns = table.getPartitionKeys();
  final List<FieldDto> allFields =
    Lists.newArrayListWithCapacity(nonPartitionColumns.size() + partitionColumns.size());
  nonPartitionColumns.stream()
    .map(field -> this.hiveToMetacatField(field, false))
    .forEachOrdered(allFields::add);
  partitionColumns.stream()
    .map(field -> this.hiveToMetacatField(field, true))
    .forEachOrdered(allFields::add);
  dto.setFields(allFields);
  dto.setView(new ViewDto(table.getViewOriginalText(),
    table.getViewExpandedText()));
  return dto;
}

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

private static State getTableProps(Table table) {
 State tableProps = new State();
 for (Map.Entry<String, String> entry : table.getParameters().entrySet()) {
  tableProps.setProp(entry.getKey(), entry.getValue());
 }
 if (table.isSetCreateTime()) {
  tableProps.setProp(HiveConstants.CREATE_TIME, table.getCreateTime());
 }
 if (table.isSetLastAccessTime()) {
  tableProps.setProp(HiveConstants.LAST_ACCESS_TIME, table.getCreateTime());
 }
 if (table.isSetOwner()) {
  tableProps.setProp(HiveConstants.OWNER, table.getOwner());
 }
 if (table.isSetTableType()) {
  tableProps.setProp(HiveConstants.TABLE_TYPE, table.getTableType());
 }
 if (table.isSetRetention()) {
  tableProps.setProp(HiveConstants.RETENTION, table.getRetention());
 }
 return tableProps;
}

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

private static State getTableProps(Table table) {
 State tableProps = new State();
 for (Map.Entry<String, String> entry : table.getParameters().entrySet()) {
  tableProps.setProp(entry.getKey(), entry.getValue());
 }
 if (table.isSetCreateTime()) {
  tableProps.setProp(HiveConstants.CREATE_TIME, table.getCreateTime());
 }
 if (table.isSetLastAccessTime()) {
  tableProps.setProp(HiveConstants.LAST_ACCESS_TIME, table.getCreateTime());
 }
 if (table.isSetOwner()) {
  tableProps.setProp(HiveConstants.OWNER, table.getOwner());
 }
 if (table.isSetTableType()) {
  tableProps.setProp(HiveConstants.TABLE_TYPE, table.getTableType());
 }
 if (table.isSetRetention()) {
  tableProps.setProp(HiveConstants.RETENTION, table.getRetention());
 }
 return tableProps;
}

代码示例来源:origin: org.spark-project.hive/hive-metastore

optionals.set(2);
if (struct.isSetCreateTime()) {
 optionals.set(3);
 oprot.writeString(struct.owner);
if (struct.isSetCreateTime()) {
 oprot.writeI32(struct.createTime);

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

optionals.set(2);
if (struct.isSetCreateTime()) {
 optionals.set(3);
 oprot.writeString(struct.owner);
if (struct.isSetCreateTime()) {
 oprot.writeI32(struct.createTime);

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

return isSetOwner();
case CREATE_TIME:
 return isSetCreateTime();
case LAST_ACCESS_TIME:
 return isSetLastAccessTime();

代码示例来源:origin: org.spark-project.hive/hive-metastore

return isSetOwner();
case CREATE_TIME:
 return isSetCreateTime();
case LAST_ACCESS_TIME:
 return isSetLastAccessTime();

代码示例来源:origin: Netflix/metacat

final Date creationDate = table.isSetCreateTime() ? epochSecondsToDate(table.getCreateTime()) : null;
final List<FieldInfo> allFields =
  Lists.newArrayListWithCapacity(nonPartitionColumns.size() + partitionColumns.size());

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

return isSetOwner();
case CREATE_TIME:
 return isSetCreateTime();
case LAST_ACCESS_TIME:
 return isSetLastAccessTime();

代码示例来源:origin: com.netflix.metacat/metacat-connector-hive

final Date creationDate = table.isSetCreateTime() ? epochSecondsToDate(table.getCreateTime()) : null;
final List<FieldInfo> allFields =
  Lists.newArrayListWithCapacity(nonPartitionColumns.size() + partitionColumns.size());

代码示例来源:origin: org.apache.hive/hive-standalone-metastore

return isSetOwner();
case CREATE_TIME:
 return isSetCreateTime();
case LAST_ACCESS_TIME:
 return isSetLastAccessTime();

相关文章

Table类方法