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

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

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

  1. private static class ThreadLocalHive extends ThreadLocal<Hive> {
  2. @Override
  3. protected Hive initialValue() {
  4. return null;
  5. }
  6. @Override
  7. public synchronized void set(Hive hiveObj) {
  8. Hive currentHive = this.get();
  9. if (currentHive != hiveObj) {
  10. // Remove/close current thread-local Hive object before overwriting with new Hive object.
  11. remove();
  12. super.set(hiveObj);
  13. }
  14. }
  15. @Override
  16. public synchronized void remove() {
  17. Hive currentHive = this.get();
  18. if (currentHive != null) {
  19. // Close the metastore connections before removing it from thread local hiveDB.
  20. currentHive.close(false);
  21. super.remove();
  22. }
  23. }
  24. }

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

  1. public void alterTable(String tblName, Table newTbl, boolean cascade, EnvironmentContext environmentContext)
  2. throws InvalidOperationException, HiveException {
  3. String[] names = Utilities.getDbTableName(tblName);
  4. try {
  5. // Remove the DDL_TIME so it gets refreshed
  6. if (newTbl.getParameters() != null) {
  7. newTbl.getParameters().remove(hive_metastoreConstants.DDL_TIME);
  8. }
  9. newTbl.checkValidity(conf);
  10. if (environmentContext == null) {
  11. environmentContext = new EnvironmentContext();
  12. }
  13. if (cascade) {
  14. environmentContext.putToProperties(StatsSetupConst.CASCADE, StatsSetupConst.TRUE);
  15. }
  16. getMSC().alter_table_with_environmentContext(names[0], names[1], newTbl.getTTable(), environmentContext);
  17. } catch (MetaException e) {
  18. throw new HiveException("Unable to alter table. " + e.getMessage(), e);
  19. } catch (TException e) {
  20. throw new HiveException("Unable to alter table. " + e.getMessage(), e);
  21. }
  22. }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  1. public void alterTable(String tblName, Table newTbl, boolean cascade)
  2. throws InvalidOperationException, HiveException {
  3. String[] names = Utilities.getDbTableName(tblName);
  4. try {
  5. // Remove the DDL_TIME so it gets refreshed
  6. if (newTbl.getParameters() != null) {
  7. newTbl.getParameters().remove(hive_metastoreConstants.DDL_TIME);
  8. }
  9. newTbl.checkValidity();
  10. getMSC().alter_table(names[0], names[1], newTbl.getTTable(), cascade);
  11. } catch (MetaException e) {
  12. throw new HiveException("Unable to alter table. " + e.getMessage(), e);
  13. } catch (TException e) {
  14. throw new HiveException("Unable to alter table. " + e.getMessage(), e);
  15. }
  16. }

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

  1. table.checkValidity();
  2. return table;

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

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

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

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

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

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

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

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

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

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

相关文章

Table类方法