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

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

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

Table.getProtectMode介绍

暂无

代码示例

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

  1. /**
  2. * @return True if protect mode attribute of the partition indicate
  3. * that it is OK to drop the partition
  4. */
  5. public boolean canDrop() {
  6. ProtectMode mode = getProtectMode();
  7. return (!mode.noDrop && !mode.offline && !mode.readOnly);
  8. }

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

  1. /**
  2. * @return True if protect mode attribute of the partition indicate
  3. * that it is OK to drop the partition
  4. */
  5. public boolean canDrop() {
  6. ProtectMode mode = getProtectMode();
  7. return (!mode.noDrop && !mode.offline && !mode.readOnly && !mode.noDropCascade);
  8. }

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

  1. /**
  2. * @return True if protect mode attribute of the table indicate
  3. * that it is OK to write the table
  4. */
  5. public boolean canWrite() {
  6. ProtectMode mode = getProtectMode();
  7. return (!mode.offline && !mode.readOnly);
  8. }

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

  1. /**
  2. * @return True protect mode indicates the table if offline.
  3. */
  4. public boolean isOffline(){
  5. return getProtectMode().offline;
  6. }

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

  1. /**
  2. * @return True if protect mode attribute of the table indicate
  3. * that it is OK to write the table
  4. */
  5. public boolean canWrite() {
  6. ProtectMode mode = getProtectMode();
  7. return (!mode.offline && !mode.readOnly);
  8. }

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

  1. /**
  2. * @return True protect mode indicates the table if offline.
  3. */
  4. public boolean isOffline(){
  5. return getProtectMode().offline;
  6. }

代码示例来源: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: 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. part.setProtectMode(mode);
  2. } else {
  3. mode = tbl.getProtectMode();
  4. setAlterProtectMode(protectModeEnable,protectMode, mode);
  5. tbl.setProtectMode(mode);

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

  1. mode = part.getProtectMode();
  2. } else {
  3. mode = tbl.getProtectMode();

相关文章

Table类方法