> @@ -121,4 +124,13 @@ public AWSS3AsyncBlobStore(BlobStoreContext context, 
> BlobUtils blobUtils,
>                 blob2Object.apply(blob), options);
>    }
>  
> +   @Override
> +   public ListenableFuture<Boolean> createContainerInLocation(Location 
> location, String container,
> +                                                              
> CreateContainerOptions options) {
> +      if (Futures.getUnchecked(containerExists(container))) {
> +         // Return false if container already exists. See JCLOUDS-334 for 
> details.
> +         return Futures.immediateFuture(Boolean.FALSE);
> +      }
> +      return super.createContainerInLocation(location, container, options);
> +   }

Yes, this works as advertised for Google Cloud Storage and one other S3-clone 
I've tried. I'd rather not put this in S3AsyncBlobStore because that would 
blindly double the createContainer RPC overhead for all S3 providers.

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

Reply via email to