org.apache.hadoop.hive.ql.metadata.Table.getRetention()方法的使用及代码示例

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

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

Table.getRetention介绍

暂无

代码示例

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

private static void getTableMetaDataInformation(StringBuilder tableInfo, Table  tbl,
  boolean isOutputPadded) {
 formatOutput("Database:", tbl.getDbName(), tableInfo);
 formatOutput("OwnerType:", (tbl.getOwnerType() != null) ? tbl.getOwnerType().name() : "null", tableInfo);
 formatOutput("Owner:", tbl.getOwner(), tableInfo);
 formatOutput("CreateTime:", formatDate(tbl.getTTable().getCreateTime()), tableInfo);
 formatOutput("LastAccessTime:", formatDate(tbl.getTTable().getLastAccessTime()), tableInfo);
 formatOutput("Retention:", Integer.toString(tbl.getRetention()), tableInfo);
 if (!tbl.isView()) {
  formatOutput("Location:", tbl.getDataLocation().toString(), tableInfo);
 }
 formatOutput("Table Type:", tbl.getTableType().name(), tableInfo);
 if (tbl.getParameters().size() > 0) {
  tableInfo.append("Table Parameters:").append(LINE_DELIM);
  displayAllParameters(tbl.getParameters(), tableInfo, false, isOutputPadded);
 }
}

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

private static void getTableMetaDataInformation(StringBuilder tableInfo, Table  tbl,
  boolean isOutputPadded) {
 formatOutput("Database:", tbl.getDbName(), tableInfo);
 formatOutput("Owner:", tbl.getOwner(), tableInfo);
 formatOutput("CreateTime:", formatDate(tbl.getTTable().getCreateTime()), tableInfo);
 formatOutput("LastAccessTime:", formatDate(tbl.getTTable().getLastAccessTime()), tableInfo);
 formatOutput("Retention:", Integer.toString(tbl.getRetention()), tableInfo);
 if (!tbl.isView()) {
  formatOutput("Location:", tbl.getDataLocation().toString(), tableInfo);
 }
 formatOutput("Table Type:", tbl.getTableType().name(), tableInfo);
 if (tbl.getParameters().size() > 0) {
  tableInfo.append("Table Parameters:").append(LINE_DELIM);
  displayAllParameters(tbl.getParameters(), tableInfo, false, isOutputPadded);
 }
}

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

.getOwner(), ft.getOwner());
assertEquals("Table retention didn't match for table: " + tableName,
  tbl.getRetention(), ft.getRetention());
assertEquals("Data location is not set correctly",
  wh.getDefaultTablePath(hm.getDatabase(DEFAULT_DATABASE_NAME), tableName).toString(),

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

private static void getTableMetaDataInformation(StringBuilder tableInfo, Table  tbl) {
 formatOutput("Database:", tbl.getDbName(), tableInfo);
 formatOutput("Owner:", tbl.getOwner(), tableInfo);
 formatOutput("CreateTime:", formatDate(tbl.getTTable().getCreateTime()), tableInfo);
 formatOutput("LastAccessTime:", formatDate(tbl.getTTable().getLastAccessTime()), tableInfo);
 String protectMode = tbl.getProtectMode().toString();
 formatOutput("Protect Mode:", protectMode == null ? "None" : protectMode, tableInfo);
 formatOutput("Retention:", Integer.toString(tbl.getRetention()), tableInfo);
 if (!tbl.isView()) {
  formatOutput("Location:", tbl.getDataLocation().toString(), tableInfo);
 }
 formatOutput("Table Type:", tbl.getTableType().name(), tableInfo);
 if (tbl.getParameters().size() > 0) {
  tableInfo.append("Table Parameters:").append(LINE_DELIM);
  displayAllParameters(tbl.getParameters(), tableInfo);
 }
}

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

private static void getTableMetaDataInformation(StringBuilder tableInfo, Table  tbl) {
 formatOutput("Database:", tbl.getDbName(), tableInfo);
 formatOutput("Owner:", tbl.getOwner(), tableInfo);
 formatOutput("CreateTime:", formatDate(tbl.getTTable().getCreateTime()), tableInfo);
 formatOutput("LastAccessTime:", formatDate(tbl.getTTable().getLastAccessTime()), tableInfo);
 String protectMode = tbl.getProtectMode().toString();
 formatOutput("Protect Mode:", protectMode == null ? "None" : protectMode, tableInfo);
 formatOutput("Retention:", Integer.toString(tbl.getRetention()), tableInfo);
 if (!tbl.isView()) {
  formatOutput("Location:", tbl.getDataLocation().toString(), tableInfo);
 }
 formatOutput("Table Type:", tbl.getTableType().name(), tableInfo);
 if (tbl.getParameters().size() > 0) {
  tableInfo.append("Table Parameters:").append(LINE_DELIM);
  displayAllParameters(tbl.getParameters(), tableInfo);
 }
}

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

tableReference.set("retention", hiveTable.getRetention());

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

ret.setAttribute(ATTRIBUTE_CREATE_TIME, createTime);
ret.setAttribute(ATTRIBUTE_LAST_ACCESS_TIME, lastAccessTime);
ret.setAttribute(ATTRIBUTE_RETENTION, table.getRetention());
ret.setAttribute(ATTRIBUTE_PARAMETERS, table.getParameters());
ret.setAttribute(ATTRIBUTE_COMMENT, table.getParameters().get(ATTRIBUTE_COMMENT));

相关文章

微信公众号

最新文章

更多

Table类方法