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

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

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

  1. private static void getTableMetaDataInformation(StringBuilder tableInfo, Table tbl,
  2. boolean isOutputPadded) {
  3. formatOutput("Database:", tbl.getDbName(), tableInfo);
  4. formatOutput("OwnerType:", (tbl.getOwnerType() != null) ? tbl.getOwnerType().name() : "null", tableInfo);
  5. formatOutput("Owner:", tbl.getOwner(), tableInfo);
  6. formatOutput("CreateTime:", formatDate(tbl.getTTable().getCreateTime()), tableInfo);
  7. formatOutput("LastAccessTime:", formatDate(tbl.getTTable().getLastAccessTime()), tableInfo);
  8. formatOutput("Retention:", Integer.toString(tbl.getRetention()), tableInfo);
  9. if (!tbl.isView()) {
  10. formatOutput("Location:", tbl.getDataLocation().toString(), tableInfo);
  11. }
  12. formatOutput("Table Type:", tbl.getTableType().name(), tableInfo);
  13. if (tbl.getParameters().size() > 0) {
  14. tableInfo.append("Table Parameters:").append(LINE_DELIM);
  15. displayAllParameters(tbl.getParameters(), tableInfo, false, isOutputPadded);
  16. }
  17. }

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

  1. private static void getTableMetaDataInformation(StringBuilder tableInfo, Table tbl,
  2. boolean isOutputPadded) {
  3. formatOutput("Database:", tbl.getDbName(), tableInfo);
  4. formatOutput("Owner:", tbl.getOwner(), tableInfo);
  5. formatOutput("CreateTime:", formatDate(tbl.getTTable().getCreateTime()), tableInfo);
  6. formatOutput("LastAccessTime:", formatDate(tbl.getTTable().getLastAccessTime()), tableInfo);
  7. formatOutput("Retention:", Integer.toString(tbl.getRetention()), tableInfo);
  8. if (!tbl.isView()) {
  9. formatOutput("Location:", tbl.getDataLocation().toString(), tableInfo);
  10. }
  11. formatOutput("Table Type:", tbl.getTableType().name(), tableInfo);
  12. if (tbl.getParameters().size() > 0) {
  13. tableInfo.append("Table Parameters:").append(LINE_DELIM);
  14. displayAllParameters(tbl.getParameters(), tableInfo, false, isOutputPadded);
  15. }
  16. }

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

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

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

  1. private static void getTableMetaDataInformation(StringBuilder tableInfo, Table tbl) {
  2. formatOutput("Database:", tbl.getDbName(), tableInfo);
  3. formatOutput("Owner:", tbl.getOwner(), tableInfo);
  4. formatOutput("CreateTime:", formatDate(tbl.getTTable().getCreateTime()), tableInfo);
  5. formatOutput("LastAccessTime:", formatDate(tbl.getTTable().getLastAccessTime()), tableInfo);
  6. String protectMode = tbl.getProtectMode().toString();
  7. formatOutput("Protect Mode:", protectMode == null ? "None" : protectMode, tableInfo);
  8. formatOutput("Retention:", Integer.toString(tbl.getRetention()), tableInfo);
  9. if (!tbl.isView()) {
  10. formatOutput("Location:", tbl.getDataLocation().toString(), tableInfo);
  11. }
  12. formatOutput("Table Type:", tbl.getTableType().name(), tableInfo);
  13. if (tbl.getParameters().size() > 0) {
  14. tableInfo.append("Table Parameters:").append(LINE_DELIM);
  15. displayAllParameters(tbl.getParameters(), tableInfo);
  16. }
  17. }

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

  1. private static void getTableMetaDataInformation(StringBuilder tableInfo, Table tbl) {
  2. formatOutput("Database:", tbl.getDbName(), tableInfo);
  3. formatOutput("Owner:", tbl.getOwner(), tableInfo);
  4. formatOutput("CreateTime:", formatDate(tbl.getTTable().getCreateTime()), tableInfo);
  5. formatOutput("LastAccessTime:", formatDate(tbl.getTTable().getLastAccessTime()), tableInfo);
  6. String protectMode = tbl.getProtectMode().toString();
  7. formatOutput("Protect Mode:", protectMode == null ? "None" : protectMode, tableInfo);
  8. formatOutput("Retention:", Integer.toString(tbl.getRetention()), tableInfo);
  9. if (!tbl.isView()) {
  10. formatOutput("Location:", tbl.getDataLocation().toString(), tableInfo);
  11. }
  12. formatOutput("Table Type:", tbl.getTableType().name(), tableInfo);
  13. if (tbl.getParameters().size() > 0) {
  14. tableInfo.append("Table Parameters:").append(LINE_DELIM);
  15. displayAllParameters(tbl.getParameters(), tableInfo);
  16. }
  17. }

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

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

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

  1. ret.setAttribute(ATTRIBUTE_CREATE_TIME, createTime);
  2. ret.setAttribute(ATTRIBUTE_LAST_ACCESS_TIME, lastAccessTime);
  3. ret.setAttribute(ATTRIBUTE_RETENTION, table.getRetention());
  4. ret.setAttribute(ATTRIBUTE_PARAMETERS, table.getParameters());
  5. ret.setAttribute(ATTRIBUTE_COMMENT, table.getParameters().get(ATTRIBUTE_COMMENT));

相关文章

Table类方法