You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@jclouds.apache.org by Ka-Hing Cheung <no...@github.com> on 2015/06/23 01:19:23 UTC

[jclouds] object stores typically sort the list of containers (#781)

You can view, comment on, or merge this pull request online at:

  https://github.com/jclouds/jclouds/pull/781

-- Commit Summary --

  * object stores typically sort the list of containers

-- File Changes --

    M blobstore/src/main/java/org/jclouds/blobstore/TransientStorageStrategy.java (6)

-- Patch Links --

https://github.com/jclouds/jclouds/pull/781.patch
https://github.com/jclouds/jclouds/pull/781.diff

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/781

Re: [jclouds] object stores typically sort the list of containers (#781)

Posted by Ka-Hing Cheung <no...@github.com>.
> @@ -83,7 +85,9 @@ public boolean containerExists(final String containerName) {
>  
>     @Override
>     public Iterable<String> getAllContainerNames() {
> -      return containerToBlobs.keySet();
> +      ArrayList<String> containers = new ArrayList<String>(containerToBlobs.keySet());
> +      Collections.sort(containers);
> +      return containers;

going to update this to sort in LocalBlobStore

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/781/files#r32997451

Re: [jclouds] object stores typically sort the list of containers (#781)

Posted by Andrew Gaul <no...@github.com>.
Pushed to master as 8b325d585e6ffa7eb74caff40379f25f13bab4b7.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/781#issuecomment-115027846

Re: [jclouds] object stores typically sort the list of containers (#781)

Posted by Andrew Gaul <no...@github.com>.
> @@ -83,7 +85,9 @@ public boolean containerExists(final String containerName) {
>  
>     @Override
>     public Iterable<String> getAllContainerNames() {
> -      return containerToBlobs.keySet();
> +      ArrayList<String> containers = new ArrayList<String>(containerToBlobs.keySet());
> +      Collections.sort(containers);
> +      return containers;

I checked Atmos, Azure, CloudFiles, and AWS-S3 and these all sort as well.  Can you sort in `FilesystemStorageStrategyImpl.getAllContainerNames` for consistency?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/781/files#r32997086