List of usage examples for com.amazonaws.services.glue.model GetDatabaseRequest GetDatabaseRequest
GetDatabaseRequest
From source file:com.facebook.presto.hive.metastore.glue.GlueHiveMetastore.java
License:Apache License
@Override public Optional<Database> getDatabase(String databaseName) { try {/*from w w w . j a v a 2 s .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); } }