List of usage examples for com.amazonaws.services.glue.model GetTableRequest GetTableRequest
GetTableRequest
From source file:com.facebook.presto.hive.metastore.glue.GlueHiveMetastore.java
License:Apache License
@Override public Optional<Table> getTable(String databaseName, String tableName) { try {//from w w w . j av a 2 s. co m 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); } }