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

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

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

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

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

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

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

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

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

/**
 * @return True protect mode indicates the table if offline.
 */
public boolean isOffline(){
 return getProtectMode().offline;
}

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

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

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

/**
 * @return True protect mode indicates the table if offline.
 */
public boolean isOffline(){
 return getProtectMode().offline;
}

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

part.setProtectMode(mode);
} else {
 mode = tbl.getProtectMode();
 setAlterProtectMode(protectModeEnable,protectMode, mode);
 tbl.setProtectMode(mode);

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

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

相关文章

微信公众号

最新文章

更多

Table类方法