CorrugatedIron call to delete a bucket.

OJ Reeves oj at buffered.io
Wed Feb 6 07:44:30 EST 2013


Kevin,

No I'm not saying that bucket's can't be deleted. I'm saying that you
should choose an alternative method. For example, manage your keys in
another way perhaps by querying a 2i and using the result to delete the
values. This could be done via an Erlang map reduce job. You could store
the keys elsewhere for later retrieval then delete each object via the key.

The problem here isn't deleting buckets, the problem is listing keys. I do
think that other Riak users, Basho people in particular, would be better
positioned to offer alternative approaches than me.

OJ


On Wed, Feb 6, 2013 at 10:37 PM, Kevin Burton <rkevinburton at charter.net>wrote:

> I see the warning and I would love to heed it. You are saying buckets can
> never be deleted? Rename has the same problem?
>
> On Feb 6, 2013, at 6:15 AM, OJ Reeves <oj at buffered.io> wrote:
>
> Deleting a bucket takes forever in any Riak client if the bucket has a lot
> of values in it. This is because a bucket isn't an object that is any way
> analogous to a "table" like you'd see in an RDBMS and to delete a bucket
> the keys in that bucket need to be listed first (please correct me if I'm
> wrong people!). This operation is known to be slow and using it is not
> recommended.
>
> CorrugatedIron outputs warning messages to the debug console whenever
> ListKeys or DeleteBucket are called. I'd recommend heeding those warnings
> and look to take a different approach.
>
> OJ
>
>
> On Wed, Feb 6, 2013 at 8:11 AM, Jeremiah Peschka <
> jeremiah.peschka at gmail.com> wrote:
>
>> No.
>>
>> Deleting a bucket requires deleting all keys in the bucket. It will be
>> slow.
>>
>> ---
>> Jeremiah Peschka - Founder, Brent Ozar Unlimited
>> MCITP: SQL Server 2008, MVP
>> Cloudera Certified Developer for Apache Hadoop
>>
>>
>> On Tue, Feb 5, 2013 at 1:58 PM, Kevin Burton <rkevinburton at charter.net>wrote:
>>
>>> ** **
>>>
>>> I am trying to remove a bucket. So I call client.DeleteBucket(<my
>>> bucket>) but this takes **forever**. Is there a faster way to simply
>>> remove a bucket?****
>>>
>>> ** **
>>>
>>> ** **
>>>
>>> _______________________________________________
>>> riak-users mailing list
>>> riak-users at lists.basho.com
>>> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>>>
>>>
>>
>> _______________________________________________
>> riak-users mailing list
>> riak-users at lists.basho.com
>> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>>
>>
>
>
> --
>
> OJ Reeves
> +61 431 952 586
> http://buffered.io/
>
>


-- 

OJ Reeves
+61 431 952 586
http://buffered.io/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20130206/9a8bd0bc/attachment.html>


More information about the riak-users mailing list