Sha256: 7855b42b433647c6ad811b5d29151df4f4f1f645197ebd03395bdaf728149f49

Contents?: true

Size: 763 Bytes

Versions: 5

Compression:

Stored size: 763 Bytes

Contents

Hi,

You can list the keys for the bucket and call delete for each. Or if you
put the keys (and kept track of them in your test) you can delete them
one at a time (without incurring the cost of calling list first.)

Something like:

String bucket = "my_bucket";
BucketResponse bucketResponse = riakClient.listBucket(bucket);
RiakBucketInfo bucketInfo = bucketResponse.getBucketInfo();

for(String key : bucketInfo.getKeys()) {
riakClient.delete(bucket, key);
}


would do it.

See also

http://wiki.basho.com/REST-API.html#Bucket-operations

which says

"At the moment there is no straightforward way to delete an entire
Bucket. There is, however, an open ticket for the feature. To delete all
the keys in a bucket, you’ll need to delete them all individually."

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
mail_extract-0.1.4 spec/fixtures/result_simple_with_quotes.txt
mail_extract-0.1.3 spec/fixtures/result_simple_with_quotes.txt
mail_extract-0.1.2 spec/fixtures/result_simple_with_quotes.txt
mail_extract-0.1.1 spec/fixtures/result_simple_with_quotes.txt
mail_extract-0.1.0 spec/fixtures/result_simple_with_quotes.txt