org.apache.hadoop.hive.metastore.api.Table.isTemporary()方法的使用及代码示例

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

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

Table.isTemporary介绍

暂无

代码示例

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

  1. public boolean isTemporary() {
  2. return tTable.isTemporary();
  3. }

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

  1. public boolean isTemporary() {
  2. return tTable.isTemporary();
  3. }

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

  1. @Override
  2. protected void create_table_with_environment_context(
  3. org.apache.hadoop.hive.metastore.api.Table tbl, EnvironmentContext envContext)
  4. throws AlreadyExistsException, InvalidObjectException,
  5. MetaException, NoSuchObjectException, TException {
  6. if (tbl.isTemporary()) {
  7. createTempTable(tbl, envContext);
  8. return;
  9. }
  10. // non-temp tables should use underlying client.
  11. super.create_table_with_environment_context(tbl, envContext);
  12. }

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

  1. @Override
  2. protected void create_table_with_environment_context(
  3. org.apache.hadoop.hive.metastore.api.Table tbl, EnvironmentContext envContext)
  4. throws AlreadyExistsException, InvalidObjectException,
  5. MetaException, NoSuchObjectException, TException {
  6. if (tbl.isTemporary()) {
  7. createTempTable(tbl, envContext);
  8. return;
  9. }
  10. // non-temp tables should use underlying client.
  11. super.create_table_with_environment_context(tbl, envContext);
  12. }

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

  1. /**
  2. * Convert a list of columns to a set of vertices.
  3. * Use cached vertices if possible.
  4. */
  5. private static Set<Vertex> createSourceVertices(
  6. Map<String, Vertex> vertexCache, Collection<BaseColumnInfo> baseCols) {
  7. Set<Vertex> sources = new LinkedHashSet<Vertex>();
  8. if (baseCols != null && !baseCols.isEmpty()) {
  9. for(BaseColumnInfo col: baseCols) {
  10. Table table = col.getTabAlias().getTable();
  11. if (table.isTemporary()) {
  12. // Ignore temporary tables
  13. continue;
  14. }
  15. Vertex.Type type = Vertex.Type.TABLE;
  16. String tableName = Warehouse.getQualifiedName(table);
  17. FieldSchema fieldSchema = col.getColumn();
  18. String label = tableName;
  19. if (fieldSchema != null) {
  20. type = Vertex.Type.COLUMN;
  21. label = tableName + "." + fieldSchema.getName();
  22. }
  23. sources.add(getOrCreateVertex(vertexCache, label, type));
  24. }
  25. }
  26. return sources;
  27. }

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

  1. /**
  2. * Convert a list of columns to a set of vertices.
  3. * Use cached vertices if possible.
  4. */
  5. private Set<Vertex> createSourceVertices(
  6. Map<String, Vertex> vertexCache, Collection<BaseColumnInfo> baseCols) {
  7. Set<Vertex> sources = new LinkedHashSet<Vertex>();
  8. if (baseCols != null && !baseCols.isEmpty()) {
  9. for(BaseColumnInfo col: baseCols) {
  10. Table table = col.getTabAlias().getTable();
  11. if (table.isTemporary()) {
  12. // Ignore temporary tables
  13. continue;
  14. }
  15. Vertex.Type type = Vertex.Type.TABLE;
  16. String tableName = table.getDbName() + "." + table.getTableName();
  17. FieldSchema fieldSchema = col.getColumn();
  18. String label = tableName;
  19. if (fieldSchema != null) {
  20. type = Vertex.Type.COLUMN;
  21. label = tableName + "." + fieldSchema.getName();
  22. }
  23. sources.add(getOrCreateVertex(vertexCache, label, type));
  24. }
  25. }
  26. return sources;
  27. }

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

  1. throw new HiveException("tableName="+ tableName +" is a VIRTUAL VIEW. Index on VIRTUAL VIEW is not supported.");
  2. if (baseTbl.isTemporary()) {
  3. throw new HiveException("tableName=" + tableName
  4. + " is a TEMPORARY TABLE. Index on TEMPORARY TABLE is not supported.");

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

  1. /**
  2. * Checks if the table is valid based on the rules for strict managed tables.
  3. * @param conf
  4. * @param table
  5. * @return Null if the table is valid, otherwise a string message indicating why the table is invalid.
  6. */
  7. public static String validateStrictManagedTable(Configuration conf,
  8. Table table) {
  9. if (MetastoreConf.getBoolVar(conf, MetastoreConf.ConfVars.STRICT_MANAGED_TABLES)) {
  10. if (table.isTemporary()) {
  11. // temp tables exempted from checks.
  12. return null;
  13. }
  14. TableType tableType = TableType.valueOf(table.getTableType());
  15. if (tableType == TableType.MANAGED_TABLE) {
  16. if (!MetaStoreServerUtils.isTransactionalTable(table.getParameters())) {
  17. return createValidationError(table, "Table is marked as a managed table but is not transactional.");
  18. }
  19. if (MetaStoreUtils.isNonNativeTable(table)) {
  20. return createValidationError(table, "Table is marked as a managed table but is non-native.");
  21. }
  22. if (isAvroTableWithExternalSchema(table)) {
  23. return createValidationError(table, "Managed Avro table has externally defined schema.");
  24. }
  25. }
  26. }
  27. // Table is valid
  28. return null;
  29. }

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

  1. return isTemporary();

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

  1. public boolean isTemporary() {
  2. return tTable.isTemporary();
  3. }

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

  1. @Override
  2. protected void create_table_with_environment_context(
  3. org.apache.hadoop.hive.metastore.api.Table tbl, EnvironmentContext envContext)
  4. throws AlreadyExistsException, InvalidObjectException,
  5. MetaException, NoSuchObjectException, TException {
  6. if (tbl.isTemporary()) {
  7. createTempTable(tbl, envContext);
  8. return;
  9. }
  10. // non-temp tables should use underlying client.
  11. super.create_table_with_environment_context(tbl, envContext);
  12. }

代码示例来源:origin: org.spark-project.hive/hive-metastore

  1. return Boolean.valueOf(isTemporary());

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

  1. return Boolean.valueOf(isTemporary());

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

  1. throw new HiveException("tableName="+ tableName +" is a VIRTUAL VIEW. Index on VIRTUAL VIEW is not supported.");
  2. if (baseTbl.isTemporary()) {
  3. throw new HiveException("tableName=" + tableName
  4. + " is a TEMPORARY TABLE. Index on TEMPORARY TABLE is not supported.");

代码示例来源:origin: org.apache.hive/hive-standalone-metastore

  1. return isTemporary();

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

  1. false, // isExternal: set to false here, can be overwritten by the
  2. table.isTemporary(),
  3. table.getSd().getCols(),
  4. table.getPartitionKeys(),

相关文章

Table类方法