List of usage examples for com.amazonaws.services.glue.model GetTableResult getTable
public Table getTable()
The Table
object that defines the specified table.
From source file:com.facebook.presto.hive.metastore.glue.GlueHiveMetastore.java
License:Apache License
@Override public Optional<Table> getTable(String databaseName, String tableName) { try {/* w w w.ja va 2 s .c om*/ GetTableResult result = glueClient .getTable(new GetTableRequest().withDatabaseName(databaseName).withName(tableName)); return Optional.of(GlueToPrestoConverter.convertTable(result.getTable(), databaseName)); } catch (EntityNotFoundException e) { return Optional.empty(); } catch (AmazonServiceException e) { throw new PrestoException(HIVE_METASTORE_ERROR, e); } }