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

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

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

Table.checkValidity介绍

暂无

代码示例

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

private static class ThreadLocalHive extends ThreadLocal<Hive> {
 @Override
 protected Hive initialValue() {
  return null;
 }
 @Override
 public synchronized void set(Hive hiveObj) {
  Hive currentHive = this.get();
  if (currentHive != hiveObj) {
   // Remove/close current thread-local Hive object before overwriting with new Hive object.
   remove();
   super.set(hiveObj);
  }
 }
 @Override
 public synchronized void remove() {
  Hive currentHive = this.get();
  if (currentHive != null) {
   // Close the metastore connections before removing it from thread local hiveDB.
   currentHive.close(false);
   super.remove();
  }
 }
}

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

public void alterTable(String tblName, Table newTbl, boolean cascade, EnvironmentContext environmentContext)
  throws InvalidOperationException, HiveException {
 String[] names = Utilities.getDbTableName(tblName);
 try {
  // Remove the DDL_TIME so it gets refreshed
  if (newTbl.getParameters() != null) {
   newTbl.getParameters().remove(hive_metastoreConstants.DDL_TIME);
  }
  newTbl.checkValidity(conf);
  if (environmentContext == null) {
   environmentContext = new EnvironmentContext();
  }
  if (cascade) {
   environmentContext.putToProperties(StatsSetupConst.CASCADE, StatsSetupConst.TRUE);
  }
  getMSC().alter_table_with_environmentContext(names[0], names[1], newTbl.getTTable(), environmentContext);
 } catch (MetaException e) {
  throw new HiveException("Unable to alter table. " + e.getMessage(), e);
 } catch (TException e) {
  throw new HiveException("Unable to alter table. " + e.getMessage(), e);
 }
}

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

newTbl.getParameters().remove(hive_metastoreConstants.DDL_TIME);
newTbl.checkValidity(conf);
if (environmentContext == null) {
 environmentContext = new EnvironmentContext();

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

tbl.checkValidity(conf);
} else {
 for (Partition tmpPart: allPartitions) {

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

tbl.getDeserializer()));
tbl.checkValidity(conf);
if (tbl.getParameters() != null) {
 tbl.getParameters().remove(hive_metastoreConstants.DDL_TIME);

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

tbl.checkValidity(conf);
} else {
 for (Partition tmpPart: allPartitions) {

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

ft.checkValidity(hiveConf);
assertEquals("Table names didn't match for table: " + tableName, tbl
  .getTableName(), ft.getTableName());

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

oldview.setOutputFormatClass(crtView.getOutputFormat());
oldview.checkValidity(null);
db.alterTable(crtView.getViewName(), oldview, false, null, true);
addIfAbsentByName(new WriteEntity(oldview, WriteEntity.WriteType.DDL_NO_LOCK));

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

oldview.setOutputFormatClass(crtView.getOutputFormat());
oldview.checkValidity(null);
try {
 db.alterTable(crtView.getViewName(), oldview, null);

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

public void alterTable(String tblName, Table newTbl, boolean cascade)
  throws InvalidOperationException, HiveException {
 String[] names = Utilities.getDbTableName(tblName);
 try {
  // Remove the DDL_TIME so it gets refreshed
  if (newTbl.getParameters() != null) {
   newTbl.getParameters().remove(hive_metastoreConstants.DDL_TIME);
  }
  newTbl.checkValidity();
  getMSC().alter_table(names[0], names[1], newTbl.getTTable(), cascade);
 } catch (MetaException e) {
  throw new HiveException("Unable to alter table. " + e.getMessage(), e);
 } catch (TException e) {
  throw new HiveException("Unable to alter table. " + e.getMessage(), e);
 }
}

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

table.checkValidity();
return table;

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

tbl.getDeserializer()));
tbl.checkValidity();
if (tbl.getParameters() != null) {
 tbl.getParameters().remove(Constants.DDL_TIME);

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

tbl.checkValidity();
} else {
 for (Partition tmpPart: allPartitions) {

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

tbl.getDeserializer()));
tbl.checkValidity();
if (tbl.getParameters() != null) {
 tbl.getParameters().remove(hive_metastoreConstants.DDL_TIME);

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

tbl.checkValidity();
} catch (HiveException e) {
 console.printError("Invalid table columns : " + e.getMessage(),

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

oldview.checkValidity();
try {
 db.alterTable(crtView.getViewName(), oldview);

相关文章

微信公众号

最新文章

更多

Table类方法