mirror of https://github.com/apache/jclouds.git
list MPU parts with prefix listing instead of marker
we now use segment conventions that allow us to do more efficient listing
This commit is contained in:
parent
38fa41d056
commit
e0bafd4c10
|
@ -477,12 +477,9 @@ public class RegionScopedSwiftBlobStore implements BlobStore {
|
|||
public List<MultipartPart> listMultipartUpload(MultipartUpload mpu) {
|
||||
ImmutableList.Builder<MultipartPart> parts = ImmutableList.builder();
|
||||
PageSet<? extends StorageMetadata> pageSet = list(mpu.containerName(),
|
||||
new ListContainerOptions().afterMarker(mpu.blobName() + '/').recursive());
|
||||
new ListContainerOptions().inDirectory(mpu.blobName()).recursive());
|
||||
// TODO: pagination
|
||||
for (StorageMetadata sm : pageSet) {
|
||||
if (!sm.getName().startsWith(mpu.blobName() + '/')) {
|
||||
break;
|
||||
}
|
||||
int lastSlash = sm.getName().lastIndexOf('/');
|
||||
int partNumber = Integer.parseInt(sm.getName().substring(lastSlash + 1));
|
||||
parts.add(MultipartPart.create(partNumber, sm.getSize(), sm.getETag()));
|
||||
|
|
Loading…
Reference in New Issue