From e0bafd4c10c20312d8117e193adbc915bbac5621 Mon Sep 17 00:00:00 2001 From: Ka-Hing Cheung Date: Tue, 23 Jun 2015 18:26:53 -0700 Subject: [PATCH] list MPU parts with prefix listing instead of marker we now use segment conventions that allow us to do more efficient listing --- .../swift/v1/blobstore/RegionScopedSwiftBlobStore.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/apis/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/blobstore/RegionScopedSwiftBlobStore.java b/apis/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/blobstore/RegionScopedSwiftBlobStore.java index 111dac52f3..8fdf043498 100644 --- a/apis/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/blobstore/RegionScopedSwiftBlobStore.java +++ b/apis/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/blobstore/RegionScopedSwiftBlobStore.java @@ -477,12 +477,9 @@ public class RegionScopedSwiftBlobStore implements BlobStore { public List listMultipartUpload(MultipartUpload mpu) { ImmutableList.Builder parts = ImmutableList.builder(); PageSet 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()));