jclouds-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Gaul <g...@apache.org>
Subject Re: BlobStore.clearContainer()
Date Wed, 17 Oct 2018 21:33:52 GMT
On Wed, Oct 17, 2018 at 02:05:56PM -0500, joe meiring wrote:
> I'm using 2.1.1 of jClouds to remove contents of a bucket using
> clearContainer(container, ListContainerOptions). I'm getting a "Prefix and
> delimiter support has not yet been added" Exception if there is a prefix,
> although the docs seem to indicate it should work.
> 
> https://jclouds.apache.org/reference/javadoc/2.1.x/org/jclouds/blobstore/BlobStore.html#clearContainer
> 
> If that doesn't work, what is the best way to remove everything under a
> prefix with jClouds?

I do not understand why DeleteAllKeysInList.execute eager throws an
exception here; DeleteAllKeysInList.getListing passes
ListContainerOptions to BlobStore.list so I believe this should just
work if you remove the check.  Could you test this and report it in a
JIRA issue?  Pull requests welcome, of course!

Speculating, this code was written back when jclouds only supported
pseudo-directories, a least common denominator since Atmos does not
support prefixes.  Fast-forwarding to today, all providers except Atmos
support prefix and delimeter so we should not constrain them by an
abandoned API's quirks.  I believe the existing implementation can be
substantially simplified.

-- 
Andrew Gaul
http://gaul.org/

Mime
View raw message