List of usage examples for com.amazonaws.services.glue.model GetDatabaseResult getDatabase
public Database getDatabase()
The definition of the specified database in the Data Catalog.
From source file:com.facebook.presto.hive.metastore.glue.GlueHiveMetastore.java
License:Apache License
@Override public Optional<Database> getDatabase(String databaseName) { try {/*from ww w .j a v a 2s . c o m*/ GetDatabaseResult result = glueClient.getDatabase(new GetDatabaseRequest().withName(databaseName)); return Optional.of(GlueToPrestoConverter.convertDatabase(result.getDatabase())); } catch (EntityNotFoundException e) { return Optional.empty(); } catch (AmazonServiceException e) { throw new PrestoException(HIVE_METASTORE_ERROR, e); } }