in aws-glue-datacatalog-client-common/src/main/java/com/amazonaws/glue/catalog/metastore/GlueMetastoreClientDelegate.java [756:781]
public List<org.apache.hadoop.hive.metastore.api.Partition> getPartitionsByNames(
String databaseName,
String tableName,
List<String> partitionNames
) throws TException {
checkArgument(StringUtils.isNotEmpty(databaseName), "databaseName cannot be null or empty");
checkArgument(StringUtils.isNotEmpty(tableName), "tableName cannot be null or empty");
checkNotNull(partitionNames, "partitionNames cannot be null");
List<PartitionValueList> partitionsToGet = Lists.newArrayList();
for (String partitionName : partitionNames) {
partitionsToGet.add(new PartitionValueList().withValues(partitionNameToVals(partitionName)));
}
try {
List<Partition> partitions =
glueMetastore.getPartitionsByNames(databaseName, tableName, partitionsToGet);
return CatalogToHiveConverter.convertPartitions(partitions);
} catch (AmazonServiceException e) {
throw CatalogToHiveConverter.wrapInHiveException(e);
} catch (Exception e) {
String msg = "Unable to get partition by names: " + StringUtils.join(partitionNames, "/");
logger.error(msg, e);
throw new MetaException(msg + e);
}
}