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

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

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

Table.toString介绍

暂无

代码示例

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

  1. outStream.write(tbl.getTTable().toString().getBytes("UTF-8"));
  2. outStream.write(separator);
  3. outStream.write(terminator);

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

  1. LOG.info("Exporting the metadata of table " + tbl.toString() + " to path "
  2. + metaPath.toString());
  3. try {

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

  1. String tableDesc = HiveStringUtils.escapeJava(tbl.getTTable().toString());
  2. outStream.write(tableDesc.getBytes("UTF-8"));
  3. outStream.write(separator);

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

  1. LOG.info("Exporting the metadata of table " + tbl.toString() + " to path "
  2. + metaPath.toString());
  3. try {

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

  1. @Override
  2. public void create_table_with_environment_context(final Table tbl,
  3. final EnvironmentContext envContext)
  4. throws AlreadyExistsException, MetaException, InvalidObjectException,
  5. InvalidInputException {
  6. startFunction("create_table", ": " + tbl.toString());
  7. boolean success = false;
  8. Exception ex = null;
  9. try {
  10. create_table_core(getMS(), tbl, envContext);
  11. success = true;
  12. } catch (NoSuchObjectException e) {
  13. LOG.warn("create_table_with_environment_context got ", e);
  14. ex = e;
  15. throw new InvalidObjectException(e.getMessage());
  16. } catch (MetaException | InvalidObjectException | AlreadyExistsException | InvalidInputException e) {
  17. ex = e;
  18. throw e;
  19. } catch (Exception e) {
  20. ex = e;
  21. throw newMetaException(e);
  22. } finally {
  23. endFunction("create_table", success, ex, tbl.getTableName());
  24. }
  25. }

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

  1. @Override
  2. public void create_table_with_constraints(final Table tbl,
  3. final List<SQLPrimaryKey> primaryKeys, final List<SQLForeignKey> foreignKeys,
  4. List<SQLUniqueConstraint> uniqueConstraints,
  5. List<SQLNotNullConstraint> notNullConstraints,
  6. List<SQLDefaultConstraint> defaultConstraints,
  7. List<SQLCheckConstraint> checkConstraints)
  8. throws AlreadyExistsException, MetaException, InvalidObjectException,
  9. InvalidInputException {
  10. startFunction("create_table", ": " + tbl.toString());
  11. boolean success = false;
  12. Exception ex = null;
  13. try {
  14. create_table_core(getMS(), tbl, null, primaryKeys, foreignKeys,
  15. uniqueConstraints, notNullConstraints, defaultConstraints, checkConstraints);
  16. success = true;
  17. } catch (NoSuchObjectException e) {
  18. ex = e;
  19. throw new InvalidObjectException(e.getMessage());
  20. } catch (MetaException | InvalidObjectException | AlreadyExistsException |
  21. InvalidInputException e) {
  22. ex = e;
  23. throw e;
  24. } catch (Exception e) {
  25. ex = e;
  26. throw newMetaException(e);
  27. } finally {
  28. endFunction("create_table", success, ex, tbl.getTableName());
  29. }
  30. }

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

  1. runStatementOnDriver(String.format("import table %s from '%s'", importName, exportPath));
  2. org.apache.hadoop.hive.metastore.api.Table imported = msClient.getTable("default", importName);
  3. Assert.assertEquals(imported.toString(), "insert_only",
  4. imported.getParameters().get("transactional_properties"));
  5. Path importPath = new Path(imported.getSd().getLocation());
  6. runStatementOnDriver(String.format("import table %s from '%s'", importName, exportPath));
  7. imported = msClient.getTable("default", importName);
  8. Assert.assertNull(imported.toString(), imported.getParameters().get("transactional"));
  9. Assert.assertNull(imported.toString(),
  10. imported.getParameters().get("transactional_properties"));
  11. importPath = new Path(imported.getSd().getLocation());

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

  1. outStream.write(tbl.getTTable().toString().getBytes("UTF-8"));
  2. outStream.write(separator);
  3. outStream.write(terminator);

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

  1. LOG.info("Exporting the metadata of table " + tbl.toString() + " to path "
  2. + metaPath.toString());
  3. try {

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

  1. outStream.writeBytes(tbl.getTTable().toString());
  2. outStream.write(separator);
  3. outStream.write(terminator);

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

  1. @Override
  2. public void create_table_with_environment_context(final Table tbl,
  3. final EnvironmentContext envContext)
  4. throws AlreadyExistsException, MetaException, InvalidObjectException {
  5. startFunction("create_table", ": " + tbl.toString());
  6. boolean success = false;
  7. Exception ex = null;
  8. try {
  9. create_table_core(getMS(), tbl, envContext);
  10. success = true;
  11. } catch (NoSuchObjectException e) {
  12. LOG.warn("create_table_with_environment_context got ", e);
  13. ex = e;
  14. throw new InvalidObjectException(e.getMessage());
  15. } catch (Exception e) {
  16. ex = e;
  17. if (e instanceof MetaException) {
  18. throw (MetaException) e;
  19. } else if (e instanceof InvalidObjectException) {
  20. throw (InvalidObjectException) e;
  21. } else if (e instanceof AlreadyExistsException) {
  22. throw (AlreadyExistsException) e;
  23. } else {
  24. throw newMetaException(e);
  25. }
  26. } finally {
  27. endFunction("create_table", success, ex, tbl.getTableName());
  28. }
  29. }

代码示例来源:origin: edu.berkeley.cs.shark/hive-metastore

  1. @Override
  2. public Index add_index(final Index newIndex, final Table indexTable)
  3. throws InvalidObjectException, AlreadyExistsException, MetaException, TException {
  4. startFunction("add_index", ": " + newIndex.toString() + " " + indexTable.toString());
  5. Index ret = null;
  6. Exception ex = null;
  7. try {
  8. ret = add_index_core(getMS(), newIndex, indexTable);
  9. } catch (Exception e) {
  10. ex = e;
  11. if (e instanceof InvalidObjectException) {
  12. throw (InvalidObjectException) e;
  13. } else if (e instanceof AlreadyExistsException) {
  14. throw (AlreadyExistsException) e;
  15. } else if (e instanceof MetaException) {
  16. throw (MetaException) e;
  17. } else if (e instanceof TException) {
  18. throw (TException) e;
  19. } else {
  20. MetaException me = new MetaException(e.toString());
  21. me.initCause(e);
  22. throw me;
  23. }
  24. } finally {
  25. String tableName = indexTable != null ? indexTable.getTableName() : null;
  26. endFunction("add_index", ret != null, ex, tableName);
  27. }
  28. return ret;
  29. }

代码示例来源:origin: edu.berkeley.cs.shark/hive-metastore

  1. @Override
  2. public void create_table_with_environment_context(final Table tbl,
  3. final EnvironmentContext envContext)
  4. throws AlreadyExistsException, MetaException, InvalidObjectException {
  5. startFunction("create_table", ": " + tbl.toString());
  6. boolean success = false;
  7. Exception ex = null;
  8. try {
  9. create_table_core(getMS(), tbl, envContext);
  10. success = true;
  11. } catch (NoSuchObjectException e) {
  12. ex = e;
  13. throw new InvalidObjectException(e.getMessage());
  14. } catch (Exception e) {
  15. ex = e;
  16. if (e instanceof MetaException) {
  17. throw (MetaException) e;
  18. } else if (e instanceof InvalidObjectException) {
  19. throw (InvalidObjectException) e;
  20. } else if (e instanceof AlreadyExistsException) {
  21. throw (AlreadyExistsException) e;
  22. } else {
  23. MetaException me = new MetaException(e.toString());
  24. me.initCause(e);
  25. throw me;
  26. }
  27. } finally {
  28. endFunction("create_table", success, ex, tbl.getTableName());
  29. }
  30. }

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

  1. @Override
  2. public Index add_index(final Index newIndex, final Table indexTable)
  3. throws InvalidObjectException, AlreadyExistsException, MetaException, TException {
  4. startFunction("add_index", ": " + newIndex.toString() + " " + indexTable.toString());
  5. Index ret = null;
  6. Exception ex = null;
  7. try {
  8. ret = add_index_core(getMS(), newIndex, indexTable);
  9. } catch (Exception e) {
  10. ex = e;
  11. if (e instanceof InvalidObjectException) {
  12. throw (InvalidObjectException) e;
  13. } else if (e instanceof AlreadyExistsException) {
  14. throw (AlreadyExistsException) e;
  15. } else if (e instanceof MetaException) {
  16. throw (MetaException) e;
  17. } else if (e instanceof TException) {
  18. throw (TException) e;
  19. } else {
  20. throw newMetaException(e);
  21. }
  22. } finally {
  23. String tableName = indexTable != null ? indexTable.getTableName() : null;
  24. endFunction("add_index", ret != null, ex, tableName);
  25. }
  26. return ret;
  27. }

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

  1. @Override
  2. public Index add_index(final Index newIndex, final Table indexTable)
  3. throws InvalidObjectException, AlreadyExistsException, MetaException, TException {
  4. startFunction("add_index", ": " + newIndex.toString() + " " + indexTable.toString());
  5. Index ret = null;
  6. Exception ex = null;
  7. try {
  8. ret = add_index_core(getMS(), newIndex, indexTable);
  9. } catch (Exception e) {
  10. ex = e;
  11. if (e instanceof InvalidObjectException) {
  12. throw (InvalidObjectException) e;
  13. } else if (e instanceof AlreadyExistsException) {
  14. throw (AlreadyExistsException) e;
  15. } else if (e instanceof MetaException) {
  16. throw (MetaException) e;
  17. } else if (e instanceof TException) {
  18. throw (TException) e;
  19. } else {
  20. throw newMetaException(e);
  21. }
  22. } finally {
  23. String tableName = indexTable != null ? indexTable.getTableName() : null;
  24. endFunction("add_index", ret != null, ex, tableName);
  25. }
  26. return ret;
  27. }

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

  1. @Override
  2. public void create_table_with_environment_context(final Table tbl,
  3. final EnvironmentContext envContext)
  4. throws AlreadyExistsException, MetaException, InvalidObjectException {
  5. startFunction("create_table", ": " + tbl.toString());
  6. boolean success = false;
  7. Exception ex = null;
  8. try {
  9. create_table_core(getMS(), tbl, envContext);
  10. success = true;
  11. } catch (NoSuchObjectException e) {
  12. ex = e;
  13. throw new InvalidObjectException(e.getMessage());
  14. } catch (Exception e) {
  15. ex = e;
  16. if (e instanceof MetaException) {
  17. throw (MetaException) e;
  18. } else if (e instanceof InvalidObjectException) {
  19. throw (InvalidObjectException) e;
  20. } else if (e instanceof AlreadyExistsException) {
  21. throw (AlreadyExistsException) e;
  22. } else {
  23. throw newMetaException(e);
  24. }
  25. } finally {
  26. endFunction("create_table", success, ex, tbl.getTableName());
  27. }
  28. }

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

  1. @Override
  2. public void create_table_with_environment_context(final Table tbl,
  3. final EnvironmentContext envContext)
  4. throws AlreadyExistsException, MetaException, InvalidObjectException {
  5. startFunction("create_table", ": " + tbl.toString());
  6. boolean success = false;
  7. Exception ex = null;
  8. try {
  9. create_table_core(getMS(), tbl, envContext);
  10. success = true;
  11. } catch (NoSuchObjectException e) {
  12. ex = e;
  13. throw new InvalidObjectException(e.getMessage());
  14. } catch (Exception e) {
  15. ex = e;
  16. if (e instanceof MetaException) {
  17. throw (MetaException) e;
  18. } else if (e instanceof InvalidObjectException) {
  19. throw (InvalidObjectException) e;
  20. } else if (e instanceof AlreadyExistsException) {
  21. throw (AlreadyExistsException) e;
  22. } else {
  23. throw newMetaException(e);
  24. }
  25. } finally {
  26. endFunction("create_table", success, ex, tbl.getTableName());
  27. }
  28. }

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

  1. List<SQLCheckConstraint> checkConstraints)
  2. throws AlreadyExistsException, MetaException, InvalidObjectException {
  3. startFunction("create_table", ": " + tbl.toString());
  4. boolean success = false;
  5. Exception ex = null;

相关文章

Table类方法