List of usage examples for com.amazonaws.services.glue.model GetPartitionRequest GetPartitionRequest
GetPartitionRequest
From source file:com.facebook.presto.hive.metastore.glue.GlueHiveMetastore.java
License:Apache License
@Override public Optional<Partition> getPartition(String databaseName, String tableName, List<String> partitionValues) { try {// w w w .jav a2 s . c om GetPartitionResult result = glueClient.getPartition(new GetPartitionRequest() .withDatabaseName(databaseName).withTableName(tableName).withPartitionValues(partitionValues)); return Optional.of(GlueToPrestoConverter.convertPartition(result.getPartition())); } catch (EntityNotFoundException e) { return Optional.empty(); } catch (AmazonServiceException e) { throw new PrestoException(HIVE_METASTORE_ERROR, e); } }